- Added support for PHP 8.6.
- Dropped support for PHP 8.4.
- Added
#[\NoDiscard]toRouteBuilder::generateNameFromPath()andRoutePayload::generatePayload(). PHP now emits a warning when the return value is not used.
- Added support for PHP 8.5.
- Added support for Symfony ^8.0.
- Dropped support for Symfony 7.3 and below. Only the 7.4 LTS version is still supported.
- Increased allowed array depth of
NormalizedConfigurationParametersby one level. This only affects the Psalm type and is not validated at runtime.
- Breaking change: Dropped
*Interfacesuffix from interfaces. - Breaking change: Dropped support for PHP 8.3.
- Breaking change: Dropped support for Symfony 6.4.
- Breaking change: Renamed configuration for defaults
- Added support for PHP 8.4.
- Dropped support for PHP 8.2.
- Fixed parameter doc block to allow configuration up to one array deep.
- Streamlined parameters for components to
NormalizedConfigurationParameters.
- Breaking change: Renamed package from
cqrstocqs-routing. - Breaking change: Renamed namespace from
DigitalCraftsman\CQRStoDigitalCraftsman\CQSRouting.
- Added missing auto registration of
SilentExceptionWrapperto registered handler wrappers.
- Remove replacement (in composer.json) for polyfills to enable usage of replacement in projects.
- Breaking change: Dropped support for Symfony 5.
- Added support for Symfony 7.
- Promoted
SilentExceptionHandlerto a supported handler wrapper.
- Breaking change: Switched from
handleto__invokemethod forCommandHandlerInterfaceandQueryHandlerInterface. This way the specific command or query can be type hinted in the method signature.
- Breaking change: Dropped support for PHP 8.1.
- Added support for PHP 8.3.
- Removed
@psalm-immutablekeyword fromCommandandQuery. With PHP 8.2 now being the minimum version, thereadonlykeyword can now be used for your classes.
- Breaking change: Moved route parameter validation to
RouteBuilderand made it mandatory. TheRouteParametersclass was removed in favor of parameters for theaddCommandRouteandaddQueryRoutefunctions.- 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
addCommandRouteandaddQueryRoute. The name generation might change in future versions.
- Breaking change: Moved files in
DigitalCraftsman\CQRS\ValueObjecttoDigitalCraftsman\CQRS\Routing. - Added
RouteBuilderto reduce noise in routing configuration.
- Improve debugging of route configuration.
- Added missing return type annotation for
RoutePayload::generate.
- Breaking change: Renamed
ConfigurationtoRoutePayloadand converted to a value object - Breaking change: Added
areParametersValidmethod toRequestValidatorInterface,RequestDataTransformerInterface,DTOValidatorInterfaceandHandlerWrapperInterface - Breaking change: Replaced
HandlerWrapperConfigurationwith simple map configuration. - Breaking change: Removed
serializer_contextconfiguration. It was identical with the one that can be defined in the Symfony framework configuration. - Breaking change: Added the parameters
requestValidatorClassesToMergeWithDefault,requestDataTransformerClassesToMergeWithDefault,dtoValidatorClassesToMergeWithDefaultorhandlerWrapperClassesToMergeWithDefaulttoRoutePayload. This change is only breaking when you don't use named parameters in your routing (which is highly recommended). Using those parameters instead the version without*ToMergeWithDefaultmerges the configuration with the default instead of replacing it (see routing docs). - Enabled usage of parameters in route configuration for request validators, request data transformers and DTO validators.
- Enabled usage of parameters in default configuration for request validators, request data transformers, DTO validators and handler wrappers.
- Breaking change: Drop support for PHP 8.0.
- Add support for PHP 8.2.
- Breaking change: The interface
DTODataTransformerInterfacewas renamed toRequestDataTransformerInterface. The method in it was renamed fromtransformDTODatatotransformRequestDataand the parameter from$dtoDatato$requestData. - Breaking change: The parameter
$dtoDataofDTOConstructorInterfacewas renamed to$requestData. - New component
RequestValidatorInterfaceto validate information that is only accessible from the request itself and will not be part of the DTO or must be validated before a DTO is constructed from the request data. - Added process description as part of the documentation including graph.
- Breaking change:
DTOConstructorInterfacenow returnsCommand|Queryinstead ofobject. - Breaking change:
HandlerWrapperInterfacelost "finally logic". It turns out that there are no cases that can't be handled with justthenandcatchand on the other hand, there might be issues when multiple handler wrappers are used and can't be matched with the priority, becausefinallywas always triggered last. The methodsfinallyandfinallyPriorityhave been removed from the interface. The logic of implementations must be adapted in a way that the logic is moved fromfinallyintothenandcatch. - Increased test code coverage of the moving parts to 100%.
- Marked internal parts as
@internal.
- Breaking change: The DTO data transformer that was added in
0.3.0was removed again as it became clear, that the Symfony Serializer in the full supported range is already able to handle the issue, that DTO Transformer was built for. - Supported range was increased to allow for Symfony
^6.0.
- Breaking change: The
DTODataTransformerInterfacegot a new parameterstring $dtoClasswhich needs to be added to all implementations of the interface. - Added new
DTODataTransformerwith which you can automatically handle cases where your command / query is nullable but the Javascript / Typescript client sendsundefined(which means doesn't send the properties if they arenull) through reflection.
- Validated that the package also works with PHP 8.1 and adapted the allowed range in composer.
- Initial release