mnavarrocarter / rest-bundle
Installs: 69
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1.3
- doctrine/doctrine-fixtures-bundle: ^3.0
- fzaninotto/faker: ^1.7
- league/fractal: ^0.17
- mnavarrocarter/problem-details: ^0.1
- pagerfanta/pagerfanta: ^1.0
- symfony/framework-bundle: ^4.0
- symfony/orm-pack: ^1.0
- symfony/security-bundle: ^4.0
- symfony/validator: ^4.0
Suggests
- limenius/liform-bundle: For conversion of forms to Json-Schema
- mnavarrocarter/problem-details-bundle: For automatic serialization of exceptions to RFC 7807 error representations.
- symfony/maker-bundle: For easy code generation tools.
This package is auto-updated.
Last update: 2019-08-18 18:31:41 UTC
README
Provides some utilties to rapidly build Restful API's in Symfony.
This bundle is only compatible with Symfony 4. We are working to make it compatible for other LTS versions of Symfony.
You can check the documentation here, but frist familiarize yourself with this readme.
Features:
- Create RESTful endpoints in seconds with our awesome RestController
- Transformation/Serialization layer by
league/fractal
- Eager Load selectable Hydration
- Pagination at ORM level by
whiteoctober/pagerfanta
- Easily control access to your resources implementing
OwnableInterface
- Json Body Parser Listener
- Resource Managers for cleaning your controllers.
- Subresources route support
Roadmap:
- Hypermedia Links Manager
- Advanced Collection Filtering
- Content Negotiation
Install:
Simply run:
composer require mnavarrocarter/rest-bundle
Then register the bundle in your bundles.php
:
// config/bundles.php
<?php
return [
// ...
MNC\Bundle\RestBundle\MNCRestBundle::class => ['all' => true],
];
Configuration
This bundle does not need previous configuration in order to work.
Requirements
In order to enable fast-devopment features is very recommended that you install
the symfony/maker-bundle
with composer.
Usage
First, create a resource and give it a name.
php bin/console make:resource post
Then, you should start writing your application logic, from your database seeding to your fixtures, and other things.
To get a deep understanding on how this bundle works and what are the main parts to it, read the docs.
Credits
This bundle incorporates services definitions and code from these other bundles that were extracted here to avoid dependency in other bundles.
limenius/liform-bundle
samjarret/fractal-bundle