Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89e38ef

Browse filesBrowse files
Removed invalid examples
Templating isn't a service in Symfony 4+ (even after `composer req templating`), so probably we're looking for the twig service. The Router service isn't public and can therefor not be called from the container: ``` Information for Service "router.default" ======================================== ---------------- ----------------------------------------------- Option Value ---------------- ----------------------------------------------- Service ID router.default Class Symfony\Bundle\FrameworkBundle\Routing\Router Tags - Calls setConfigCacheFactory Public no Synthetic no Lazy no Shared yes Abstract no Autowired no Autoconfigured no ---------------- ----------------------------------------------- ```
1 parent 5d4254e commit 89e38ef
Copy full SHA for 89e38ef

File tree

1 file changed

+1
-3
lines changed
Filter options

1 file changed

+1
-3
lines changed

‎controller.rst

Copy file name to clipboardExpand all lines: controller.rst
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,7 @@ If you extend the base ``Controller`` class, you can access :ref:`public service
299299
via the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::get`
300300
method. Here are several common services you might need::
301301

302-
$templating = $this->get('templating');
303-
304-
$router = $this->get('router');
302+
$twig = $this->get('twig');
305303

306304
$mailer = $this->get('mailer');
307305

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.