Releases: digital-craftsman-de/cqs-routing
Releases · digital-craftsman-de/cqs-routing
Fixed parameter doc block
- Fixed parameter doc block to allow configuration up to one array deep.
- Streamlined parameters for components to
NormalizedConfigurationParameters
.
Renamed package
After 3 years of usage in production, I feel the package is stable enough to be worth a 1.0.0 release 🙂
Updated the name of the package as I've realized that CQRS is not about separation of endpoints, but of models. And the package doesn't have anything to do with the models. It helps with CQS tough, therefore the new naming reflects that.
- Breaking change: Renamed package from
cqrs
tocqs-routing
. - Breaking change: Renamed namespace from
DigitalCraftsman\CQRS
toDigitalCraftsman\CQSRouting
.
Added missing auto registration of `SilentExceptionWrapper`
- Added missing auto registration of
SilentExceptionWrapper
to registered handler wrappers.
Remove replacement for polyfills to enable usage of replacement in projects
- Remove replacement (in composer.json) for polyfills to enable usage of replacement in projects.
Dropped Symfony 5, added Symfony 7 and promoted silent exception handler wrapper
- Breaking change: Dropped support for Symfony 5.
- Added support for Symfony 7.
- Promoted
SilentExceptionHandler
to a supported handler wrapper.
Switch method from handle to __invoke for command handlers and query handlers
- Breaking change: Switched from
handle
to__invoke
method forCommandHandlerInterface
andQueryHandlerInterface
. This way the specific command or query can be type hinted in the method signature.
Added support for PHP 8.3 and dropped support for PHP 8.1
- Breaking change: Dropped support for PHP 8.1.
- Added support for PHP 8.3.
- Removed
@psalm-immutable
keyword fromCommand
andQuery
. With PHP 8.2 now being the minimum version, thereadonly
keyword can now be used for your classes.
Improved routing performance
- Breaking change: Moved route parameter validation to
RouteBuilder
and made it mandatory. TheRouteParameters
class was removed in favor of parameters for theaddCommandRoute
andaddQueryRoute
functions.- Validation therefore happens only on cache warmup and not on execution of the route anymore. This improves the performance slightly.
- Breaking change: The route name generation changed. When the name must be something specific (because it's used as a reference), it must be set as a parameter for
addCommandRoute
andaddQueryRoute
. The name generation might change in future versions.
Add RouteBuilder
- Breaking change: Moved files in
DigitalCraftsman\CQRS\ValueObject
toDigitalCraftsman\CQRS\Routing
. - Added
RouteBuilder
to reduce noise in routing configuration.
Improve debugging of route configuration
- Improve debugging of route configuration.
- Added missing return type annotation for
RoutePayload::generate
.