Fabien Potencier feb9bf539f bug #2354 Turned fatal error into exception when a previously generated cache prevents loading its newly compiled version (nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Turned fatal error into exception when a previously generated cache prevents loading its newly compiled version

Not sure if this is testable, yet this should save some hours to people that end up in the same trap we did on our project.
It turned out we generated some twig template cache in two separate commands, in a situation where "index" tracking for embeds where lost.

This PR detects the situation and invites to clear the cache properly, because that's the only way to fix the issue.

It also fixes a mistake in the cache $key generation, that should not take $index into account.
Doing so were making offline cache warmup useless in some situations.

Commits
-------

95c10991 Turned fatal error into exception when a previously generated cache prevents loading its newly compiled version
2017-01-11 08:01:13 -08:00
2017-01-10 14:00:36 -08:00
2016-12-27 11:58:11 +01:00
2017-01-04 14:05:59 -08:00
2017-01-10 14:00:36 -08:00
2017-01-02 12:22:20 -08:00
2016-11-19 11:13:58 -08: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%