https://github.com/aretecode/specification
PHP Specification library.
https://github.com/aretecode/specification
Last synced: 9 months ago
JSON representation
PHP Specification library.
- Host: GitHub
- URL: https://github.com/aretecode/specification
- Owner: aretecode
- Created: 2015-10-18T03:31:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T19:28:02.000Z (over 10 years ago)
- Last Synced: 2025-04-03T13:44:00.356Z (10 months ago)
- Language: PHP
- Size: 148 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arete\Specification
[](https://travis-ci.org/aretecode/specification)
[](http://hhvm.h4cc.de/package/arete/specification)
[](https://twitter.com/aretecode)
[](https://packagist.org/packages/arete/specification)
[](http://packagist.org/packages/arete/specification)
[](https://www.codacy.com/app/aretecode/specification)
Specification library in PHP.
[Eric Evans & Martin Fowlers paper on Specifications](http://martinfowler.com/apsupp/spec.pdf)
# [Example](https://github.com/aretecode/specification/blob/master/examples)
[See my post on refactoring]()
A post detailing the usage in more detail will be available soon.
## Installation
It can be installed from [Packagist](https://packagist.org/arete/specification) using [Composer](https://getcomposer.org/).
In your project root just run:
`$ composer require arete/specification`
Make sure that you’ve set up your project to [autoload Composer-installed packages](https://getcomposer.org/doc/00-intro.md#autoloading).
## Running tests
Run via the command line by going to `arete/specification` directory and running `phpunit`
## @TODO
* [x] ::remainderUnsatisfiedBy()
* [ ] ::isGeneralizationOf()
* [ ] ::isSpecializationOf()
* [ ] ::asQuery() for use with db, whether it uses argument, or sep methods
* [ ] abstract part of the Collection Pipeline matching into default/premades
### P.S.
(I have had this written since I read the DDD books, I updated it a little and just found an old one by [@mathiasverraes](https://github.com/mathiasverraes/DomainTools) which was interesting!)