open-solid / cqs
Contract for Command Query Separation pattern
v1.0.4
2024-08-21 18:21 UTC
Requires
- php: >=8.2
- open-solid/bus: ^1.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.54
- phpunit/phpunit: ^10.0
- psalm/plugin-phpunit: ^0.18
- symfony/messenger: ^7.1
- vimeo/psalm: ^5.0
README
Command-Query Separation (CQS) is a principle in software design that states a function should either be a command that performs an action (modifies state) or a query that returns data, but not both. This separation ensures clarity and predictability in code. Commands alter the state of the system, while queries provide information without causing side effects.
See more https://martinfowler.com/bliki/CommandQuerySeparation.html
Installation
composer require open-solid/cqs
License
This software is published under the MIT License