PHPackages                             testabit/restgeneratorbundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. testabit/restgeneratorbundle

ActiveSymfony-bundle[API Development](/categories/api)

testabit/restgeneratorbundle
============================

REST API Generator for Symfony 2

0.1.0(11y ago)01601MITPHPPHP &gt;=5.3.0

Since Jul 9Pushed 10y ago4 watchersCompare

[ Source](https://github.com/testabit/restgeneratorbundle)[ Packagist](https://packagist.org/packages/testabit/restgeneratorbundle)[ RSS](/packages/testabit-restgeneratorbundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

Voryx REST Generator Bundle
===========================

[](#voryx-rest-generator-bundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/65d545beb32154bf1af0221222b6165285e4611e0bef653c8c40c0d4a2e781d2/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61633138343264392d346533362d343563632d386462312d6239376532653632353430652f6269672e706e67)](https://insight.sensiolabs.com/projects/ac1842d9-4e36-45cc-8db1-b97e2e62540e)

About
-----

[](#about)

A CRUD like REST Generator

Features
--------

[](#features)

- Generators RESTful action from entity
- Simplifies setting up a RESTful Controller

Installation
------------

[](#installation)

Require the "voryx/restgeneratorbundle" package in your composer.json and update your dependencies.

```
$ php composer.phar require voryx/restgeneratorbundle dev-master
```

Add the VoryxRestGeneratorBundle to your application's kernel along with other dependencies:

```
public function registerBundles()
{
    $bundles = array(
        //...
          new Voryx\RESTGeneratorBundle\VoryxRESTGeneratorBundle(),
          new FOS\RestBundle\FOSRestBundle(),
          new JMS\SerializerBundle\JMSSerializerBundle($this),
          new Nelmio\CorsBundle\NelmioCorsBundle(),
        //...
    );
    //...
}
```

Configuration
-------------

[](#configuration)

This bundle depends on a number of other symfony bundles, so they need to be configured in order for the generator to work properly

```
framework:
    csrf_protection: false #only use for public API

fos_rest:
    routing_loader:
        default_format: json
    param_fetcher_listener: true
    body_listener: true
    #disable_csrf_role: ROLE_USER
    body_converter:
        enabled: true
    view:
        view_response_listener: force

nelmio_cors:
    defaults:
        allow_credentials: false
        allow_origin: []
        allow_headers: []
        allow_methods: []
        expose_headers: []
        max_age: 0
    paths:
        '^/api/':
            allow_origin: ['*']
            allow_headers: ['*']
            allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
            max_age: 3600

sensio_framework_extra:
    request: { converters: true }
    view:    { annotations: false }
    router:  { annotations: true }
```

Generating the Controller
-------------------------

[](#generating-the-controller)

Right now, the generator uses forms created by the doctrine generator. You must create these to use the generated controller. (If you don't create them prior to running the voryx:generate:rest command, you will get an error, but it will still work if you just create them afterwards)

```
$ php app/console doctrine:generate:form AcmeDemoBundle:Post
```

Generate the REST controller

```
$ php app/console voryx:generate:rest
```

This will guide you through the generator which will generate a RESTful controller for an entity.

You will still need to Add a route for each generated entity: (Hopefully this will be added to the generator soon)

```
api_posts:
    type:     rest
    resource: "@AcmeDemoBundle/Controller/PostController.php"
    prefix: /api
```

Related Entities
----------------

[](#related-entities)

If you want the form to be able to convert related entities into the correct entity id on POST, PUT or PATCH, use the voryx\_entity form type

```
#Form/PostType()

    ->add(
        'user', 'voryx_entity', array(
            'class' => 'Acme\Bundle\Entity\User'
        )
    )
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/caf07d3391601e703ade8066cc5260e27634ee9465952b689361fcb71b7419eb?d=identicon)[testabit](/maintainers/testabit)

---

Top Contributors

[![davidwdan](https://avatars.githubusercontent.com/u/4969183?v=4)](https://github.com/davidwdan "davidwdan (22 commits)")[![danidelalin](https://avatars.githubusercontent.com/u/1449678?v=4)](https://github.com/danidelalin "danidelalin (16 commits)")[![mbonneau](https://avatars.githubusercontent.com/u/748287?v=4)](https://github.com/mbonneau "mbonneau (10 commits)")[![gabriel-anglada](https://avatars.githubusercontent.com/u/1537450?v=4)](https://github.com/gabriel-anglada "gabriel-anglada (8 commits)")[![Ninir](https://avatars.githubusercontent.com/u/855022?v=4)](https://github.com/Ninir "Ninir (5 commits)")[![mhor](https://avatars.githubusercontent.com/u/4103719?v=4)](https://github.com/mhor "mhor (1 commits)")

### Embed Badge

![Health badge](/badges/testabit-restgeneratorbundle/health.svg)

```
[![Health](https://phpackages.com/badges/testabit-restgeneratorbundle/health.svg)](https://phpackages.com/packages/testabit-restgeneratorbundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67410.3M25](/packages/googleads-googleads-php-lib)[voryx/restgeneratorbundle

REST API Generator for Symfony 2

178141.7k1](/packages/voryx-restgeneratorbundle)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

4684.7k2](/packages/fschmtt-keycloak-rest-api-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
