Skip to content

Commit f07830c

Browse files
committed
Merge pull request symfony#2641 from bamarni/patch-7
[Twig] removed unneeded configuration
2 parents a103278 + 85a00c7 commit f07830c

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

book/templating.rst

+1-35
Original file line numberDiff line numberDiff line change
@@ -1340,43 +1340,9 @@ in a JavaScript string, use the ``js`` context:
13401340
Debugging
13411341
---------
13421342

1343-
.. versionadded:: 2.0.9
1344-
This feature is available as of Twig ``1.5.x``, which was first shipped
1345-
with Symfony 2.0.9.
1346-
13471343
When using PHP, you can use ``var_dump()`` if you need to quickly find the
13481344
value of a variable passed. This is useful, for example, inside your controller.
1349-
The same can be achieved when using Twig by using the debug extension. This
1350-
needs to be enabled in the config:
1351-
1352-
.. configuration-block::
1353-
1354-
.. code-block:: yaml
1355-
1356-
# app/config/config.yml
1357-
services:
1358-
acme_hello.twig.extension.debug:
1359-
class: Twig_Extension_Debug
1360-
tags:
1361-
- { name: 'twig.extension' }
1362-
1363-
.. code-block:: xml
1364-
1365-
<!-- app/config/config.xml -->
1366-
<services>
1367-
<service id="acme_hello.twig.extension.debug" class="Twig_Extension_Debug">
1368-
<tag name="twig.extension" />
1369-
</service>
1370-
</services>
1371-
1372-
.. code-block:: php
1373-
1374-
// app/config/config.php
1375-
use Symfony\Component\DependencyInjection\Definition;
1376-
1377-
$definition = new Definition('Twig_Extension_Debug');
1378-
$definition->addTag('twig.extension');
1379-
$container->setDefinition('acme_hello.twig.extension.debug', $definition);
1345+
The same can be achieved when using Twig thanks to the the debug extension.
13801346

13811347
Template parameters can then be dumped using the ``dump`` function:
13821348

0 commit comments

Comments
 (0)