2017 © Pedro PelĂĄez
 

symfony-bundle rest-bundle

A bundle based on FriendsOfSymfony/RestBundle. Gives a base pattern for Resource definition and manipulation, along with base Controllers and Services to avoid REST resource manipulation code redundancy.

image

gtheron/rest-bundle

A bundle based on FriendsOfSymfony/RestBundle. Gives a base pattern for Resource definition and manipulation, along with base Controllers and Services to avoid REST resource manipulation code redundancy.

  • Friday, October 2, 2015
  • by GTheron
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

GTheronRestBundle

This bundle depends on FOSRestBundle. In a word, it aims at providing a base for REST resource definition and CRUD manipulation., (*1)

What is this bundle?

If you're working on a REST api with Symfony2, you probably have used FOSRestBundle. It offers functionnality for controllers and automatic routing, which is remarkably handy for building any REST api., (*2)

However, after having used it for a relatively large api, with lots of entities - which in the REST vocabulary would be Resources - I still had a lot of boilerplate code, especially since almost all resources needed at least basic CRUD functions. This meant code repetition in Controllers, Services and Models., (*3)

This bundle aims to provide a base definition for exposed Resources, as well as a service that provides CRUD operations for all resources, and abstract controllers with boilerplate code for the most common functions (cget, get, post and put - delete being quite trivial to write generally)., (*4)

Note that as the moment of writing, I basically just ported code. There are a few things I need to work on before it's quite ready for use:, (*5)

Feature State
Making authorization checks optional Written, being tested
Offering more/better events in the validation cycle Written, being tested
Automatic event generation Written, being tested
Recursive resources (sub resource atm) In design phase

Feel free to take a look at the code and provide suggestions!, (*6)

Requirements

FOSRestBundle will be required with composer on install. However, at this time, the Symfony ACL system is required to be initialized and ready for use (this is temporary, as it will only be needed in the future if you use the security options of the bundle). Refer to this doc to install it: http://symfony.com/doc/current/cookbook/security/acl.html, (*7)

The Versions

02/10 2015

dev-master

9999999-dev https://github.com/GTheron

A bundle based on FriendsOfSymfony/RestBundle. Gives a base pattern for Resource definition and manipulation, along with base Controllers and Services to avoid REST resource manipulation code redundancy.

  Sources   Download

MIT

The Requires

 

by Gabriel Théron

rest