Download the PHP package wizards/rest-bundle without Composer
On this page you can find all versions of the php package wizards/rest-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package rest-bundle
Symfony bundle for wizards/php-rest-api
Helps you create a REST API in an expressive and streamlined way. It will help you conceive mature and discoverable APIs, thanks to the jsonapi specification. Regardless of the output serialization, the request format will be the same. Have a look at http://github.com/wizardstechnologies/php-rest-api for further documentation and explanations. You can find an example project on https://github.com/BigZ/promoteapi
Requirements
Installation
Configuration
Create a configuration file with the following values:
Usage
Create a REST API the easy and configurable way !
This bundle ease the use of wizard's php rest api, and provide some extra goodies for symfony:
- a subscriber to automatically serialize your responses
- a subscriber to automatically serialize your exceptions
- a param converter to inject PSR-7 requests in your controllers
- a multi-part exception to easily serialize multiple errors (such as the one from forms)
- a controller trait that helps on serializing input data from json and jsonapi
If you use symfony flex, those services will be automatically registered.
To serialize a single resource, just return the object from a controller:
Note that we don't use the param injector for the entity as we want to be able to dispatch an error ourselves so it is properly formatted.
To Serialize a collection, use the collectionManager
To deserialize input, use the json trait
All versions of rest-bundle with dependencies
ext-json Version *
nyholm/psr7 Version ^1.1
pagerfanta/pagerfanta Version ^2.0
symfony/http-kernel Version ^4.4|^5.0
symfony/psr-http-message-bridge Version ^2.0
symfony/validator Version ^4.4|^5.0
sensio/framework-extra-bundle Version ^5.2
wizards/rest-api Version 0.9.0