Download the PHP package shooktea/request-deserializer-bundle without Composer
On this page you can find all versions of the php package shooktea/request-deserializer-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download shooktea/request-deserializer-bundle
More information about shooktea/request-deserializer-bundle
Files in shooktea/request-deserializer-bundle
Download shooktea/request-deserializer-bundle
More information about shooktea/request-deserializer-bundle
Files in shooktea/request-deserializer-bundle
Vendor shooktea
Package request-deserializer-bundle
Short Description Small bundle for deserializing and validating requests from JSON to objects
License MIT
Package request-deserializer-bundle
Short Description Small bundle for deserializing and validating requests from JSON to objects
License MIT
Please rate this library. Is it a good library?
Informations about the package request-deserializer-bundle
RequestDeserializerBundle
Tested on PHP 8.1 with Symfony 6.0.
Installation
Install with Composer:
And add bundle to bundles.php (if was not added automatically by Symfony Flex):
How to use it?
- Create a class implementing
ShookTea\RequestDeserializerBundle\Query\QueryInterface(for GET parameters) orShookTea\RequestDeserializerBundle\Request\RequestInterface(for POST parameters) - add annotations from
symfony/serializerandsymfony/validatorcomponents if necessary - inject your class to controller method
And that's it!
Example query class: (for GET parameters)
Usage in controller:
After requesting /some/route?id=217c26de-132e-49f7-a17d-fd80a70e3fe3, in someAction() method of controller,
object $query will have a $uuid with value "217c26de-132e-49f7-a17d-fd80a70e3fe3".
All versions of request-deserializer-bundle with dependencies
PHP Build Version
Package Version
Requires
php Version
8.*
symfony/framework-bundle Version 6.*
symfony/serializer Version 6.*
symfony/validator Version 6.*
symfony/framework-bundle Version 6.*
symfony/serializer Version 6.*
symfony/validator Version 6.*
The package shooktea/request-deserializer-bundle contains the following files
Loading the files please wait ...