Fabien Potencier d632fd3c33 feature #2530 Throw exception on circular reference detection (yceruto)
This PR was merged into the 1.x branch.

Discussion
----------

Throw exception on circular reference detection

Out-the-box this isn't common... but into Symfony framework this kind of issue can happen frequently when we're overriding a template from third-party bundle (see main issue https://github.com/symfony/symfony/issues/17557)

```twig
{# app/Resources/AcmeBlogBundle/views/Blog/index.html.twig #}
{% extends '@AcmeBlog/Blog/index.html.twig' %}

{% block title 'New Title' %}
```

This exception avoids inifite loop or maximum execution time for this case, by detecting a recursive loading when a template extends from itself, thinking to override the parent template which has the same namespace + template name.

Commits
-------

074e1fbe Throw exception on circular reference detection
2017-07-22 09:30:00 +02:00
2017-06-16 06:42:12 -07:00
2017-07-04 16:20:04 +03:00
2015-01-20 03:31:04 +01:00
2017-05-30 19:25:17 +02:00
2017-07-20 19:25:08 +02:00
2017-07-04 16:20:04 +03:00
2017-05-24 10:12:32 +02:00
2017-01-02 12:22:20 -08:00
2017-03-11 20:03:13 +01:00
2013-11-11 20:04:42 +01:00

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP, released under the new BSD license (code
and documentation).

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: http://twig.sensiolabs.org/documentation
Languages
PHP 99.9%