Releases: WonderNetwork/slim-kernel
v2.1.1
v2.1.0
Automatically serialize response DTOs into JSON responses
2.0.4
Merge pull request #11 from WonderNetwork/feature/deserialize-enums denormalize enums
2.0.3
v2.0.3 Merge pull request #10 from WonderNetwork/feature/deserialize-nested-…
2.0.2
Merge pull request #9 from WonderNetwork/feature/upgrade-deps composer update
2.0.1
Merge pull request #8 from WonderNetwork/fix/closure-serialization closures can’t reference self/$this in order for them to be serialized
2.0.0
Input parsing
In order to simplify input parsing, you can use the Symfony Serializer component to
automatically denormalize parsed request body or get params to a data transfer object
of your choice. In your controller, simply mark one of the parameters with #[Payload]
attribute and typehint it with your desired class:
public function __invoke(#[WonderNetwork\SlimKernel\Http\Serializer\Payload] MyDto $input) {}If the serializer fails to denormalize the input, a HttpBadRequestException will be
thrown with a semi-helpful message attached. If you require custom serializer setup,
you can register your own instance using the following container key:
\WonderNetwork\SlimKernel\ServiceFactory\SlimServiceFactory::INPUT_DENORMALIZER
1.7.0
Support glob patterns like **/*.php to match any directory depth
1.6.0
add floats to array accessor
1.5.0
Allow configuring if symfony console application exits automatically by overriding the AutoExit::class service