Download the PHP package halloverden/symfony-request-entity-bundle without Composer
On this page you can find all versions of the php package halloverden/symfony-request-entity-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download halloverden/symfony-request-entity-bundle
More information about halloverden/symfony-request-entity-bundle
Files in halloverden/symfony-request-entity-bundle
Package symfony-request-entity-bundle
Short Description Symfony request entity bundle
License MIT
Informations about the package symfony-request-entity-bundle
HalloVerdenRequestEntityBundle
Deserializes a request to an entity.
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
Usage
-
Create a class that extends
AbstractRequestEntity
. example:Override the
getRequestDataValidationFields
method to validate the request data. These validation rules must match the incoming request which is an array (i.e. after decoding a json request)- In your controller inject this request class using the paramconverter. Example:
All versions of symfony-request-entity-bundle with dependencies
halloverden/symfony-http-exceptions Version ^1.2|^2.0
jms/serializer-bundle Version ^3.10|^4.2|^5.0
php Version >=8.1
sensio/framework-extra-bundle Version ^5.5|^6.0
symfony/validator Version ^5.4|^6.4|^7.0