eboreum / value-object-interface
Flag a class as a value-object by implementing the ValueObjectInterface.
Requires
- php: ^8.0
Requires (Dev)
- overtrue/phplint: ^9.7
- phpstan/phpstan: ^2.1
- slevomat/coding-standard: ^8.27
- squizlabs/php_codesniffer: ^4.0
README

Implement Eboreum\ValueObjectInterface\ValueObjectInterface on any class to flag it as a value-object.
A value-object should never cause any side effects. For instance, a value-object should not cause database writes, cause network requests, cause logging, or similar things.
Requirements
"php": "^8.0"
Installation
Via Composer (https://packagist.org/packages/eboreum/value-object-interface):
composer require eboreum/value-object-interface
Via GitLab:
git clone git@gitlab.com:eboreum/value-object-interface.git
License & Disclaimer
See LICENSE file. Basically: Use this library at your own risk.
Contributing
We prefer that you create an issue and or a merge request at https://gitlab.com/eboreum/value-object-interface, and have a discussion about a feature or bug here.
Credits
Authors
- Kasper Søfren (kafoso)
E-mail: soefritz@gmail.com
Homepage: https://gitlab.com/kafoso / https://github.com/kafoso
Acknowledgements
This library is largely inspired by PSR-20: Clock, which in a similar fashion defines just a single interface. Also see https://packagist.org/packages/psr/clock.