Commit Graph

3271 Commits

Author SHA1 Message Date
Fabien Potencier b8f1dc59c1 feature #2229 Bump minimum version to PHP 5.6 (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Bump minimum version to PHP 5.6

Twig 2.0 will be released really soon now (hopefully by the end of the year). So, it's time again to reconsider the minimum PHP version we want to support.

I would like to bump it to PHP 5.6 for the following reasons:

* PHP 5.5 is not supported anymore (not even security fixes now);

* the latest Ubuntu LTS is already using PHP 7!

* #2228 allows to improve performance significantly and having this without the `if`statement makes the optimization more interesting.

What do you think?

Commits
-------

af3b0a5 bumped minimum version to PHP 5.6
2016-11-10 11:50:59 -08:00
Fabien Potencier af3b0a550c bumped minimum version to PHP 5.6 2016-11-10 11:37:20 -08:00
Fabien Potencier fa4a5ebf31 Merge branch '1.x' into 2.x
* 1.x:
  updated CHANGELOG
  bumped version to 1.28
  added testing PHP 7.1
  Enhance perf of Template::getAttribute()
  added a note about the default escaping strategy
  removed Xdebug on Travis
2016-11-10 11:33:40 -08:00
Fabien Potencier 924c2f4813 updated CHANGELOG 2016-11-10 11:30:21 -08:00
Fabien Potencier 81a174ff6c feature #2228 Enhance perf of Template::getAttribute() (nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Enhance perf of Template::getAttribute()

Note that this is unproved statement for now :)
If someone has a benchmark and want to try, please do (and share results).

Commits
-------

bdbfb15 Enhance perf of Template::getAttribute()
2016-11-10 11:29:27 -08:00
Fabien Potencier d630f870a7 bumped version to 1.28 2016-11-10 11:28:46 -08:00
Fabien Potencier 61f840c85f minor #2231 Remove Xdebug for tests (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Remove Xdebug for tests

Commits
-------

498dcf4 removed Xdebug on Travis
2016-11-10 11:24:03 -08:00
Fabien Potencier 224deeb3e9 minor #2232 Add testing PHP 7.1 (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Add testing PHP 7.1

Commits
-------

56e09fb added testing PHP 7.1
2016-11-10 11:23:51 -08:00
Fabien Potencier 56e09fb7d3 added testing PHP 7.1 2016-11-10 11:15:19 -08:00
Nicolas Grekas bdbfb15111 Enhance perf of Template::getAttribute() 2016-11-10 19:43:25 +01:00
Fabien Potencier 1c99469bcc minor #2227 added a note about the default escaping strategy (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

added a note about the default escaping strategy

fixes #2061

Commits
-------

56556d7 added a note about the default escaping strategy
2016-11-10 10:28:59 -08:00
Fabien Potencier 56556d72f8 added a note about the default escaping strategy 2016-11-10 10:28:06 -08:00
Fabien Potencier b82accd78f Merge branch '1.x' into 2.x
* 1.x:
  fixed typo
  Load templates from cache, even if they have just been compiled
  Allow construction without constructor arguments
2016-11-08 12:47:43 -08:00
Fabien Potencier dc3533c347 fixed typo 2016-11-08 12:40:21 -08:00
Fabien Potencier b37db3bc93 bug #2216 Load templates from cache, even if they have just been compiled (mpdude)
This PR was squashed before being merged into the 1.x branch (closes #2216).

Discussion
----------

Load templates from cache, even if they have just been compiled

Previously, when the cache was empty, the compiled template would be written to it, but `eval()`d from `$content`. In that case, it is not possible to step through (read: debug) the compiled template because at least xDebug does not have a clue where the code comes from.

With this change, PHP/xDebug can tell even on the first run (with an empty cache) where the code was loaded from.

Commits
-------

ff0abbb Load templates from cache, even if they have just been compiled
2016-11-07 19:10:29 -08:00
Matthias Pigulla ff0abbb7e8 Load templates from cache, even if they have just been compiled 2016-11-07 19:10:26 -08:00
Fabien Potencier 3314cd546e minor #2214 Allow construction without constructor arguments (gnat42)
This PR was merged into the 1.x branch.

Discussion
----------

Allow construction without constructor arguments

Since we can dynamically add templates and its possible to not need to construct the loader without any initial templates. I've added the default argument to the constructor for simpler instantiation IE new Twig_Loader_Array();. This helps us on a project where we've extended the loader, and have no initial templates but need to add constructor parameters for no real reason.

Commits
-------

289f63c Allow construction without constructor arguments
2016-11-07 11:42:43 -08:00
Fabien Potencier e7ad435a1c oops 2016-11-07 11:41:00 -08:00
Fabien Potencier e7d45e95e2 fixed version constants 2016-11-07 11:40:29 -08:00
Fabien Potencier 212ea63ae3 Merge branch '1.x' into 2.x
* 1.x:
  add machine-readable version constants
  Fixing wrong function name in deprecation notice
  bumped version to 1.27.1-DEV
  prepared the 1.27.0 release
2016-11-07 11:39:28 -08:00
Fabien Potencier c575ff2119 minor #2222 add machine-readable version constants (xabbuh)
This PR was merged into the 1.x branch.

Discussion
----------

add machine-readable version constants

This will make it easier to implement version depending features (see https://github.com/symfony/symfony/pull/20440#discussion_r86840491 for an example).

Commits
-------

bf07db4 add machine-readable version constants
2016-11-07 11:37:58 -08:00
Christian Flothmann bf07db4f13 add machine-readable version constants 2016-11-07 19:49:36 +01:00
Nathanael Noblet 289f63c258 Allow construction without constructor arguments
Since we can dynamically add templates and its possible to not need to construct the loader without any initial templates. I've added the default argument to the constructor for simpler instantiation IE new Twig_Loader_Array();. This helps us on a project where we've extended the loader, and have no initial templates but need to add constructor parameters for no real reason.
2016-11-01 13:44:13 -06:00
Fabien Potencier eeeb1c35f8 minor #2209 Fixing wrong function name in deprecation notice (kubawerlos)
This PR was merged into the 1.x branch.

Discussion
----------

Fixing wrong function name in deprecation notice

Commits
-------

0a3d3c7 Fixing wrong function name in deprecation notice
2016-10-28 07:39:51 -07:00
Kuba Werłos 0a3d3c7ce1 Fixing wrong function name in deprecation notice 2016-10-28 15:26:19 +02:00
Fabien Potencier 3ff5abf75b bumped version to 1.27.1-DEV 2016-10-25 12:28:14 -07:00
Fabien Potencier 3c6c0033fd prepared the 1.27.0 release v1.27.0 2016-10-25 12:17:17 -07:00
Fabien Potencier 50c8024766 Merge branch '1.x' into 2.x
* 1.x:
  fixed undefined variables
2016-10-25 10:31:35 -07:00
Fabien Potencier 5e396e559d fixed undefined variables 2016-10-25 10:31:00 -07:00
Fabien Potencier 5e4fa99dc9 removed obsolete code 2016-10-24 16:59:56 -07:00
Fabien Potencier 262d1b6cff Merge branch '1.x' into 2.x
* 1.x:
  deprecated Twig_Parser::getEnvironment()
  moved tests handling in Twig_ParserExpression instead of Twig_Extension_Core
2016-10-24 16:58:36 -07:00
Fabien Potencier 2555dd009c feature #2206 Move tests handling in Twig_ParserExpression instead of Twig_Extension_Core (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Move tests handling in Twig_ParserExpression instead of Twig_Extension_Core

In my quest to better organize the layers in Twig, I've always find the way we deal with test a bit awkward. This PR moves the code from the Core extension to the Parser, where it belongs, even if if makes hardcoding 'is' and 'is not' twice, but I think SOC is more important here. Especially as I want to remove the `getEnvironment()` from the Parser class at some point. Having everything centralized helps a lot.

Commits
-------

4deb03a deprecated Twig_Parser::getEnvironment()
0d6686e moved tests handling in Twig_ParserExpression instead of Twig_Extension_Core
2016-10-24 16:48:00 -07:00
Fabien Potencier 4deb03aeb1 deprecated Twig_Parser::getEnvironment() 2016-10-24 16:37:44 -07:00
Fabien Potencier 0d6686ec30 moved tests handling in Twig_ParserExpression instead of Twig_Extension_Core 2016-10-24 16:37:28 -07:00
Fabien Potencier b31222134b minor #2205 removed code specific to older versions of PHP (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

removed code specific to older versions of PHP

Commits
-------

273d0d3 removed code specific to older versions of PHP
2016-10-24 16:05:22 -07:00
Fabien Potencier 273d0d3f98 removed code specific to older versions of PHP 2016-10-24 14:54:48 -07:00
Fabien Potencier a4f31885a3 removed obsolete code 2016-10-24 08:27:35 -07:00
Fabien Potencier 6c60f432db Merge branch '1.x'
* 1.x:
  deprecated Twig_Compiler::addIndentation()
  added a note about when to remove a workaround
  deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()
2016-10-24 08:27:08 -07:00
Fabien Potencier 9cab8b9f37 feature #2202 deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()

I don't even understand why these methods are here. It looks like they never had any usage in the core.

Commits
-------

31c444b deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()
2016-10-24 08:26:26 -07:00
Fabien Potencier cefaecfc38 feature #2203 deprecated Twig_Compiler::addIndentation() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated Twig_Compiler::addIndentation()

Commits
-------

bc499a4 deprecated Twig_Compiler::addIndentation()
2016-10-24 08:25:31 -07:00
Fabien Potencier bc499a47e1 deprecated Twig_Compiler::addIndentation() 2016-10-23 22:44:52 -07:00
Fabien Potencier 7e5c06a3be added a note about when to remove a workaround 2016-10-23 14:24:54 -07:00
Fabien Potencier 31c444b511 deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor() 2016-10-23 13:50:47 -07:00
Fabien Potencier cda9a0f7a4 Merge branch '1.x'
* 1.x:
  fixed regression when registering two extensions having the same class name
2016-10-23 13:17:01 -07:00
Fabien Potencier c97f3b85c3 bug #2200 fixed regression when registering two extensions with the same class (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

fixed regression when registering two extensions with the same class

fixed #2165

Commits
-------

47432f3 fixed regression when registering two extensions having the same class name
2016-10-23 13:13:39 -07:00
Fabien Potencier 47432f3244 fixed regression when registering two extensions having the same class name 2016-10-23 13:11:53 -07:00
Fabien Potencier 02c0cb59f3 removed obsolete code 2016-10-21 20:25:38 -07:00
Fabien Potencier 37cacdcde8 Merge branch '1.x'
* 1.x:
  removed unneeded abstraction
2016-10-21 20:24:15 -07:00
Fabien Potencier 09bf2bae50 removed unneeded abstraction 2016-10-21 20:23:53 -07:00
Fabien Potencier 07957af326 removed obsolete doc 2016-10-21 17:38:22 -07:00