Browse files

feature #4009 Remove "Controllers extends ContainerAware" best practi…

…ce (tgalopin)

This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #4009).


Remove "Controllers extends ContainerAware" best practice

As discussed in #4008, I remove the best practice consisting of extending ContainerAware instead of base Controller class to improve DX.


992033f Remove "Controllers extends ContainerAware" best practice
  • Loading branch information...
weaverryan committed Jul 25, 2014
2 parents ba9632e + 1e620ae commit f943eee70cf81b90a598d94f400a3723216fe726
Showing with 0 additions and 17 deletions.
  1. +0 −17 cookbook/bundles/best_practices.rst
@@ -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.
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`
.. 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.

0 comments on commit f943eee

Please sign in to comment.