10000 feature #4009 Remove "Controllers extends ContainerAware" best practi… · symfony/symfony-docs@f943eee · GitHub
[go: up one dir, main page]

Skip to content

Commit f943eee

Browse files
committed
feature #4009 Remove "Controllers extends ContainerAware" best practice (tgalopin)
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #4009). Discussion ---------- 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. Commits ------- 992033f Remove "Controllers extends ContainerAware" best practice
2 parents ba9632e + 1e620ae commit f943eee

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

cookbook/bundles/best_practices.rst

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,6 @@ Extensive documentation should also be provided in the
194194
the ``Resources/doc/`` directory; the ``Resources/doc/index.rst`` file is
195195
the only mandatory file and must be the entry point for the documentation.
196196

197-
Controllers
198-
-----------
199-
200-
As a best practice, controllers in a bundle that's meant to be distributed
201-
to others must not extend the
202-
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` base class.
203-
They can implement
204-
:class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface` or
205-
extend :class:`Symfony\\Component\\DependencyInjection\\ContainerAware`
206-
instead.
207-
208-
.. note::
209-
210-
If you have a look at
211-
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` methods,
212-
you will see that they are only nice shortcuts to ease the learning curve.
213-
214197
Routing
215198
-------
216199

0 commit comments

Comments
 (0)
0