Download the PHP package kenny1911/ajax-bundle without Composer
On this page you can find all versions of the php package kenny1911/ajax-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kenny1911/ajax-bundle
More information about kenny1911/ajax-bundle
Files in kenny1911/ajax-bundle
Package ajax-bundle
Short Description Symfony bundle for help creating ajax endpoints
License MIT
Informations about the package ajax-bundle
Ajax Bundle
Language: [ English | Русский ]
Description
kenny1911/ajax-bundle is a Symfony bundle that allows controllers marked with the #[Ajax] attribute to:
- Return DTOs instead of
Responseobjects. - Automatically convert controller responses to JSON.
- Convert exceptions thrown in the controller to JSON responses.
Together with Symfony Mapping Request Data, it can be used as a simpler alternative to FOS REST Bundle.
The symfony/serializer package is used for serialization. Serialization is performed only in JSON format.
Installation
Add Kenny1911\AjaxBundle\AjaxBundle to bundles.php.
Usage
Simply add the #[Ajax] attribute to a controller method, and the returned DTO will automatically be converted to JSON.
Example Usage
The client will receive the following JSON response:
Compatibility
- PHP 8.1+
- Symfony 5.4+
License
This project is licensed under the MIT License. See the LICENSE file for details.
All versions of ajax-bundle with dependencies
symfony/config Version ^5.4 || ^6.0 || ^7.0
symfony/dependency-injection Version ^5.4 || ^6.0 || ^7.0
symfony/error-handler Version ^5.4 || ^6.0 || ^7.0
symfony/event-dispatcher Version ^5.4 || ^6.0 || ^7.0
symfony/http-foundation Version ^5.4 || ^6.0 || ^7.0
symfony/http-kernel Version ^5.4 || ^6.0 || ^7.0
symfony/serializer Version ^5.4 || ^6.0 || ^7.0