This PR was merged into the 1.x branch.
Discussion
----------
Remove deprecated return types from the PHPDocs.
There are deprecation warnings added to the environment (for example https://github.com/twigphp/Twig/blob/1.x/lib/Twig/Environment.php#L1287).
This PR aims to remove the deprecated return types from the PHPDocs as well. It will be useful for developers, but for for IDE's/SCA as well.
Commits
-------
831fd60 Remove deprecated return types from the PHPDocs.
This PR was merged into the 2.0-dev branch.
Discussion
----------
use try-finally for macro compilation
Commits
-------
53d01ff use try-finally for macro compilation
This PR was merged into the 1.x branch.
Discussion
----------
changed template cache names to take into account the Twig C extension
Commits
-------
76ecd43 changed template cache names to take into account the Twig C extension
* 1.x:
simplified code
updated CHANGELOG
Non-existing files are not cached by statcache
Fix race condition in `Environment::loadTemplate`
Fix instance variable declaration in Filesystem cache
added @internal when appropriate
fixed implementation of Null cache
bumped version to 1.22.2-DEV
prepared the 1.22.1 release
updated CHANGELOG
String-case in template_from_string
Prevent potential doc comments in escaped inlined source
bumped version to 1.22.1-DEV
prepared the 1.22.0 release
updated CHANGELOG
More flexible integration test
This PR was merged into the 1.x branch.
Discussion
----------
Fix race condition in `Environment::loadTemplate` (1.x)
Fixes#1836 (1.x branch)
Commits
-------
1bb7000 Fix race condition in `Environment::loadTemplate`
This PR was merged into the 1.x branch.
Discussion
----------
Fix instance variable declaration in Filesystem cache
Commits
-------
d88c8a9 Fix instance variable declaration in Filesystem cache
This PR was merged into the 1.x branch.
Discussion
----------
Non-existing files are not cached by statcache
Reverts #1583
Based on the docs this cannot happen because the stat cache is only active for existing files.
> You should also note that PHP doesn't cache information about non-existent files. So, if you call file_exists() on a file that doesn't exist, it will return FALSE until you create the file. If you create the file, it will return TRUE even if you then delete the file. However unlink() clears the cache automatically.
http://php.net/manual/en/function.clearstatcache.php
Also the arugments you pass to clearstatcache(false, $filename) make no sense according the documentation and are not effective.
> filename
Clear the realpath and the stat cache for a specific filename only; only used if clear_realpath_cache is TRUE.
Also doctrine cachee does't use this approach either: https://github.com/doctrine/cache/blob/master/lib/Doctrine/Common/Cache/FileCache.php#L185 And nobody reported problems with this as far as I can see.
Commits
-------
4edf3fd Non-existing files are not cached by statcache
Reverts #1583
Based on the docs this cannot happen because the stat cache is only active for existing files.
> You should also note that PHP doesn't cache information about non-existent files. So, if you call file_exists() on a file that doesn't exist, it will return FALSE until you create the file. If you create the file, it will return TRUE even if you then delete the file. However unlink() clears the cache automatically.
http://php.net/manual/en/function.clearstatcache.php
Also the arugments you pass to clearstatcache(false, $filename) make no sense according the documentation and are not effective.
> filename
Clear the realpath and the stat cache for a specific filename only; only used if clear_realpath_cache is TRUE.
Also doctrine cachee does't use this approach either: https://github.com/doctrine/cache/blob/master/lib/Doctrine/Common/Cache/FileCache.php#L185 And nobody reported problems with this as far as I can see.
This PR was merged into the 1.x branch.
Discussion
----------
added @internal when appropriate
Commits
-------
2c0839c added @internal when appropriate
This PR was merged into the 1.x branch.
Discussion
----------
fixed implementation of Null cache
fixes#1832
Commits
-------
b43e298 fixed implementation of Null cache
This PR was merged into the 1.x branch.
Discussion
----------
String-cast in template_from_string
Fixes#1829 caused by https://github.com/twigphp/Twig/pull/1807/files#diff-5e190f538c5c328c7473a5cfd3b7cd95R578
As twig allows many types in twig templates, e.g. array or traversable, we can do the same for string.
But we only take this approach for twig exposed function/filters etc, i.e. template code, but not core code.
Commits
-------
e1e3655 String-case in template_from_string
This PR was merged into the 1.x branch.
Discussion
----------
Prevent potential doc comments in escaped inlined source
Hopefully the last patch of this multi-patches feature...
Commits
-------
f35a540 Prevent potential doc comments in escaped inlined source
This PR was squashed before being merged into the 1.x branch (closes#1806).
Discussion
----------
More flexible integration test
replaces https://github.com/twigphp/Twig/pull/1805 as a 1.x version
Commits
-------
3f779f6 More flexible integration test
This PR was merged into the 1.x branch.
Discussion
----------
No need to check modification time when opcache_invalidate
- We know the file is new
- No need to check if opcache/apc is enabled as these methods will just return false in this case
Commits
-------
f63099e No need to check modification time when opcache_invalidate
* 1.x:
added a recipe about how to render a template stored as a string
added an option to force PHP bytecode invalidation when writing a compiled template into the cache
rewrote the recipes about APC and opcache to avoid deprecation notices
added a note about Twig_Loader_String alternatives
This PR was merged into the 1.x branch.
Discussion
----------
rewrote the recipes about APC and opcache to avoid deprecation notices
Commits
-------
96a54b3 added an option to force PHP bytecode invalidation when writing a compiled template into the cache
e9b0802 rewrote the recipes about APC and opcache to avoid deprecation notices
This PR was merged into the 1.x branch.
Discussion
----------
added a recipe about how to render a template stored as a string
Commits
-------
77fed4e added a recipe about how to render a template stored as a string
* 1.x:
changed the arguments of generateKey
deprecated Twig_Environment::getTemplateClassPrefix
removed empty () in an error message
added enabled extension names in the generated template class names
fixed the profiler duration for the root node
no need to call setTimezone on a current date
use str_replace instead of strtr to escape the source in the template
This PR was merged into the 1.x branch.
Discussion
----------
Profiler root duration fix
When using the Twig profiler, the root node is a bit special and the duration should really be the sum of the children duration. That should fix#1792
Commits
-------
f1e963c fixed the profiler duration for the root node