Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Generates Symfony2 bundles, entities, forms, CRUD, and more...

feature #377 CRUD-generator follows symfony best practices (maidmaid)

This PR was squashed before being merged into the 3.0.x-dev branch (closes #377).


CRUD-generator follows symfony best practices

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #344
| License       | MIT
| Doc PR        |

Follow best practices :
- [x] [So it's much simpler to let newAction handle everything.](
- [x] [Add buttons in the templates, not in the form classes or the controllers.](
- [x] [Store all your application's templates in ``app/Resources/views/ directory``.](
- [x] [Rendering the Form](
- [x] [We recommend using ``$form->isSubmitted()`` in the if statement for clarity.](
- [x] [Use the ``ParamConverter`` trick to automatically query for Doctrine entities when it's simple and convenient.](
- [x]  [Use lowercased snake_case for directory and template names.](

Others :
- [x] Use ``redirectToRoute()`` shortcut notation for routing.

For see quickly the generated result, click on [this repo]( ([controller](, [views](, [routing](


cb40ead CRUD-generator follows symfony best practices
latest commit e5bc3e91e5
@javiereguiluz javiereguiluz authored


The SensioGeneratorBundle extends the default Symfony2 command line interface by providing new interactive and intuitive commands for generating code skeletons like bundles, form classes, or CRUD controllers based on a Doctrine 2 schema.

More information in the official documentation.

Something went wrong with that request. Please try again.