Download the PHP package pfilsx/dto-param-converter-bundle without Composer
On this page you can find all versions of the php package pfilsx/dto-param-converter-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dto-param-converter-bundle
DTO Param Converter Bundle
Description
The bundle provides a simple way to map requests into DTO(Data Transfer Object), validate and inject into Your Symfony project controller. It automatically deserealize request content into provided DTO, validates it (if required) and injects DTO into your controller argument(Symfony Argument Resolver), and finally you have a fully valid DTO in your controller.
Features
- Request deserialization into dto with configurable serializer
- Automatic configurable validation using Symfony validator
- Easy to configure converter options for each request/DTO via annotations/PHP8 attributes(preload, serializer, validator options etc)
- Entity preload into DTO before request deserialization
Requirement
- PHP 7.4+|8.x
- Symfony 4.4+|5.3+|6.0+
Installation
Open a command console, enter your project directory and execute the following command to download the latest version of this bundle:
Register bundle into config/bundles.php
(Flex did it automatically):
Documentation
Documentation can be found here.
Usage
-
Create DTO class with converter annotation/attribute
-
Use DTO in your controller
-
Link DTO with entity(if preload required)
- Create entity-dto mapper(if preload required)
Configuration
You can configure bundle globally via config/packages/dto_param_converter.yaml
:
Or You can configure converter for each action
License
This bundle is released under the MIT license.
Contribute
If you'd like to contribute, feel free to propose a pull request, create issue or just contact me :)
All versions of dto-param-converter-bundle with dependencies
symfony/framework-bundle Version ^4.4|^5.3|^6.0
doctrine/annotations Version ^1.0|^2.0
symfony/serializer Version ^4.4|^5.3|^6.0
symfony/property-access Version ^4.4|^5.3|^6.0
symfony/property-info Version ^4.4|^5.3|^6.0