Skip to content

Commit

Permalink
Remove "Controllers extends ContainerAware" best practice
Browse files Browse the repository at this point in the history
  • Loading branch information
tgalopin authored and weaverryan committed Jul 25, 2014
1 parent ba9632e commit 1e620ae
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions cookbook/bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,23 +194,6 @@ Extensive documentation should also be provided in the
the ``Resources/doc/`` directory; the ``Resources/doc/index.rst`` file is
the only mandatory file and must be the entry point for the documentation.

Controllers
-----------

As a best practice, controllers in a bundle that's meant to be distributed
to others must not extend the
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` base class.
They can implement
:class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface` or
extend :class:`Symfony\\Component\\DependencyInjection\\ContainerAware`
instead.

.. note::

If you have a look at
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` methods,
you will see that they are only nice shortcuts to ease the learning curve.

Routing
-------

Expand Down

0 comments on commit 1e620ae

Please sign in to comment.