Download the PHP package pgs-soft/restfony-bundle without Composer
On this page you can find all versions of the php package pgs-soft/restfony-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package restfony-bundle
PGS Software / Restfony Bundle
Bundle to assist with creating classes for Doctrine Entity with aim to speed up creating RESTful APIs.
Installation
Require the bundle with composer:
Enable the bundle (with dependent bundles) in the kernel:
Prepare config for Restfony and FOSRestBundle:
and include it in the main config:
Add routing definition, e.g.:
Usage
Having an entity run command:
provide entity shortcut name (e.g. AppBundle:MyEntity
), decide about adding "write" actions and generation of routing.
New files will be generated:
- Controller/MyEntityController.php - controller with RESTful actions and ApiDoc
- Form/Filter/MyEntityFilterType.php - form filter class
- Form/Type/MyEntityType.php - form type class
- Manager/MyEntityManager.php - empty class to manage repository
- Manager/MyEntityManagerInterface.php - interface for manager from above
- Repository/MyEntityRepository.php - empty repository class
- Resources/config/serializer/Entity.MyEntity.yml - config for JMS Serializer
- Tests/MyEntityControllerTest.php - set up of tests for generated actions
And configs will be updated:
- rest.yml - module for MyEntity will be added
- rest_routing.yml - entry for MyEntity will be added
API Doc
If needed you can add NelmioApiDocBundle API documentation route, e.g.:
Authors
- Lech Groblewicz [email protected]
- Michał Sikora
Contributors
All versions of restfony-bundle with dependencies
doctrine/doctrine-bundle Version ^1.6
friendsofsymfony/rest-bundle Version ^2.0
jms/serializer-bundle Version ^1.1
knplabs/knp-paginator-bundle Version ^2.5
lexik/form-filter-bundle Version ^5.0
nelmio/api-doc-bundle Version ^2.13
symfony/symfony Version ^3.1
willdurand/hateoas-bundle Version ^1.2