Commit Graph

2980 Commits

Author SHA1 Message Date
Fabien Potencier df1a77c4d8 feature #1969 add hasser support to getAttribute() (xabbuh)
This PR was submitted for the 1.x branch but it was merged into the 2.0-dev branch instead (closes #1969).

Discussion
----------

add hasser support to getAttribute()

This resolves #1750.

Commits
-------

d3c3c60 add hasser support to getAttribute()
2016-01-31 09:00:17 +01:00
Christian Flothmann d3c3c605d5 add hasser support to getAttribute() 2016-01-31 09:00:17 +01:00
Fabien Potencier 892302f848 Merge branch '1.x'
* 1.x:
  marked some Twig_Environment methods as being internal
  bumped version to 1.24.1-DEV
  prepared the 1.24.0 release
  bumped version to 1.24
2016-01-27 06:49:29 +01:00
Fabien Potencier e0fbf85380 feature #1889 marked some Twig_Environment methods as being internal (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

marked some Twig_Environment methods as being internal

This PR marks some `Twig_Environment` methods as being internals:

 * `getFunctions()`, `getFilters()`, `getTests()`, `getFunction()`, `getFilter()`, `getTest()`, `getTokenParsers()`, `getTags()`, `getNodeVisitors()`, `getUnaryOperators()`, `getBinaryOperators()` because I don't see how they can be used in any useful way and anyway, `getFunctions()` and `getFilters()` do not return all possible functions or filters. Moreover, I think that all this logic could be refactored and moved into its own class for 2.0 (could be done by deprecating those existing methods in 1.x if we agree to merge this PR).

 * `getGlobals()` because it should only be called in a runtime context, not in a compilation one (so limiting its usage to internal use only allows for better control of usage).

 * `initGlobals()`, `initExtensions()`, `initExtension()` because they are private in Twig 2.0.

Commits
-------

212730a marked some Twig_Environment methods as being internal
2016-01-27 06:24:52 +01:00
Fabien Potencier 212730aa48 marked some Twig_Environment methods as being internal 2016-01-27 06:24:02 +01:00
Fabien Potencier 317f22132d bumped version to 1.24.1-DEV 2016-01-25 22:25:12 +01:00
Fabien Potencier 3e5aa30ebf prepared the 1.24.0 release v1.24.0 2016-01-25 22:22:18 +01:00
Fabien Potencier 25acc19e22 bumped version to 1.24 2016-01-25 22:21:03 +01:00
Fabien Potencier eed7915715 fixed 2.0 compat 2016-01-25 21:29:21 +01:00
Fabien Potencier 908990a9e5 Merge branch '1.x'
* 1.x:
  adding support for the ?? operator
  fixed the defined test when used on a constant, a map, or a sequence
  updated CHANGELOG
  compare charset strictly
2016-01-25 18:12:00 +01:00
Fabien Potencier 97beaa2894 feature #1972 Null coalescing op (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Null coalescing op

fixes #1949

Commits
-------

cdd57f3 adding support for the ?? operator
2016-01-25 18:09:27 +01:00
Fabien Potencier cdd57f33b5 adding support for the ?? operator 2016-01-25 17:15:20 +01:00
Fabien Potencier 67fd42b9e7 bug #1971 fixed the defined test when used on a constant, a map, or a sequence (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

fixed the defined test when used on a constant, a map, or a sequence

Commits
-------

62e8ee3 fixed the defined test when used on a constant, a map, or a sequence
2016-01-25 17:12:54 +01:00
Fabien Potencier 62e8ee3124 fixed the defined test when used on a constant, a map, or a sequence 2016-01-25 16:58:02 +01:00
Fabien Potencier 7dc9fb27a1 minor #1966 Use strict comparison for charset (JhonnyL)
This PR was merged into the 1.x branch.

Discussion
----------

Use strict comparison for charset

There is no reason not to use strict comparison here. Also some minor cs fixes.

Commits
-------

4f32737 compare charset strictly
2016-01-25 15:55:24 +01:00
Fabien Potencier 57cc04b0f6 updated CHANGELOG 2016-01-21 15:45:18 +01:00
Fabien Potencier aad9ebadbe Merge branch '1.x'
* 1.x:
  fixed CHANGELOG
  undeprecated _self
  Fix Parser context push on stack
  bumped version to 1.23.4-DEV
  prepared the 1.23.3 release
  Fix typo.
  bumped version to 1.23.3-DEV
  prepared the 1.23.2 release
2016-01-19 13:30:57 +01:00
Fabien Potencier e5820ba221 feature #1965 reintroduced _self (returns the current template name) (fabpot)
This PR was merged into the 2.0-dev branch.

Discussion
----------

reintroduced _self (returns the current template name)

fixes #1932, see #1964 fro the 1.x counterpart.

Commits
-------

1015a8f reintroduced _self (returns the current template name)
2016-01-19 13:29:44 +01:00
Fabien Potencier 1015a8f9db reintroduced _self (returns the current template name) 2016-01-19 13:29:02 +01:00
Fabien Potencier eb6e05e7dd fixed CHANGELOG 2016-01-19 13:28:04 +01:00
Fabien Potencier 9cad008311 feature #1964 undeprecated _self (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

undeprecated _self

Un-deprecated `_self`. As mentioned in #1932, `_self` is sometimes used to get the current template name, which is a legitimate usage and almost always the user intent. Moreover, when `_self` is used in a template, it is mostly passed to Twig functions that are able to deal with Twig templates or Twig template names indifferently.

fixes #1932

Commits
-------

b490e65 undeprecated _self
2016-01-19 13:27:34 +01:00
JhonnyL 4f327372bd compare charset strictly 2016-01-17 20:03:22 +01:00
Fabien Potencier b490e6594f undeprecated _self 2016-01-16 06:36:39 +01:00
Fabien Potencier 24d9266d0f bug #1930 Fix Parser context push on stack (molaux)
This PR was squashed before being merged into the 1.x branch (closes #1930).

Discussion
----------

Fix Parser context push on stack

Hello,

With php7RC8, in Twig_Parser, parse method starts by saving current context in
copying self properties on stack. It sounds like get_object_vars returns now
references instead of copies of properties (at least for arrays). Consequently,
when reinitializing Parser for subparse line 92 to 99, the preserved context on
stack was also erased.

As a result, when calling {{ parent() }} after a {%embed%}{%endembed%}, the restored blockStack being empty, Twig throws a Twig_Error_Syntax('Calling "parent" outside a block is forbidden.'), despite the fact it is really in a block that extends another.
When calling {{ parent() }} before  the embed tag, all works properly. (It seems that the empty context, resulting of subparses, is not a problem as far as you don't need to access it)

Commits
-------

07ebdfe Fix Parser context push on stack
2016-01-11 15:50:45 +01:00
Marc-Olivier Laux 07ebdfef4d Fix Parser context push on stack 2016-01-11 15:50:44 +01:00
Fabien Potencier 97d8fec15f bumped version to 1.23.4-DEV 2016-01-11 15:04:36 +01:00
Fabien Potencier ae53fc2c31 prepared the 1.23.3 release v1.23.3 2016-01-11 15:02:19 +01:00
Fabien Potencier 673e5017bd minor #1958 Fxi typo (SpacePossum)
This PR was merged into the 1.x branch.

Discussion
----------

Fxi typo

https://github.com/twigphp/Twig/issues/1957
and
https://github.com/twigphp/Twig/issues/1956

Commits
-------

88ab45b Fix typo.
2016-01-11 15:00:33 +01:00
Possum 88ab45b379 Fix typo. 2016-01-11 14:57:20 +01:00
Fabien Potencier d9b3e14ca4 bumped version to 1.23.3-DEV 2016-01-11 14:23:38 +01:00
Fabien Potencier d07c53df79 prepared the 1.23.2 release v1.23.2 2016-01-11 14:20:06 +01:00
Fabien Potencier f99650a03b removed deprecated class 2016-01-11 14:11:52 +01:00
Fabien Potencier b7e6f85ab9 Merge branch '1.x'
* 1.x:
  updated CHANGELOG
  [DOC] Fixed typos in advanced.rst
  Improve deprecations message Add the version in the message
  Make file cache tolerant for trailing (back)slashes on directory configuration.
2016-01-11 14:10:29 +01:00
Fabien Potencier 8ea9d44921 replaced dirname(__FILE__) with __DIR__ 2016-01-11 14:05:04 +01:00
Fabien Potencier 934f6f0093 updated CHANGELOG 2016-01-11 13:46:47 +01:00
Fabien Potencier 8dacaeca7e minor #1954 Improve deprecations message (Ener-Getick)
This PR was merged into the 1.x branch.

Discussion
----------

Improve deprecations message

This PR specifies the version in which some ``Twig_SimpleTest`` were deprecated to make it easier to upgrade a package.

Commits
-------

fdb1937 Improve deprecations message Add the version in the message
2016-01-11 13:24:54 +01:00
Fabien Potencier 4474392b86 bug #1953 rtrim cache dir (SpacePossum)
This PR was merged into the 1.x branch.

Discussion
----------

rtrim cache dir

@see #1951

Commits
-------

c3ec2fb Make file cache tolerant for trailing (back)slashes on directory configuration.
2016-01-11 13:21:56 +01:00
Fabien Potencier dba78c81cd minor #1929 [DOC] Fixed typos in advanced.rst (althaus)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #1929).

Discussion
----------

[DOC] Fixed typos in advanced.rst

Hey,

there are two typos of `Interace`. Although it sounds cool, `Interface` works better for copy and paste.

Cheers
Matthais

Commits
-------

57cd302 [DOC] Fixed typos in advanced.rst
2016-01-07 22:43:28 +01:00
Matthias Althaus 57cd302f50 [DOC] Fixed typos in advanced.rst
There are two typos of `Interace`. Although it sounds cool, `Interface` works better for copy and paste.
2016-01-07 22:43:13 +01:00
Fabien Potencier 37bde2e4bc updated CHANGELOG 2016-01-07 22:38:20 +01:00
Fabien Potencier 3af3dcb6d3 feature #1955 Let PHP convert Twig_Markup to JSON instead of pre-filtering it (stof)
This PR was merged into the 2.0-dev branch.

Discussion
----------

Let PHP convert Twig_Markup to JSON instead of pre-filtering it

See http://blog.blackfire.io/blackfire-on-blackfire-twig-and-json.html for the reason to do this.
The bump of the requirement to PHP 5.5+ in Twig 2 makes it possible to rely on ``JsonSerializable``

Commits
-------

8bd96c1 Let PHP convert Twig_Markup to JSON instead of pre-filtering it
2016-01-07 22:37:36 +01:00
Christophe Coevoet 8bd96c12d3 Let PHP convert Twig_Markup to JSON instead of pre-filtering it 2016-01-07 22:29:55 +01:00
Ener-Getick fdb19375f5 Improve deprecations message
Add the version in the message
2016-01-07 18:53:18 +01:00
Possum c3ec2fb1de Make file cache tolerant for trailing (back)slashes on directory configuration. 2016-01-06 10:29:32 +01:00
Fabien Potencier 1a817fc8ee Merge branch '1.x'
* 1.x:
  Update copyright year
  Removed usage of deprecated constant
2016-01-03 16:38:03 +01:00
Fabien Potencier 23e47c5242 minor #1952 Update copyright year (jeroenvisser101)
This PR was merged into the 1.x branch.

Discussion
----------

Update copyright year

Happy new year!

Commits
-------

c07c4ab Update copyright year
2016-01-03 16:37:06 +01:00
Jeroen Visser c07c4ab585 Update copyright year
Happy new year!
2016-01-01 02:33:03 +01:00
Fabien Potencier 7df0a5512d minor #1940 Removed usage of deprecated constant (hason)
This PR was merged into the 1.x branch.

Discussion
----------

Removed usage of deprecated constant

Commits
-------

f19318d Removed usage of deprecated constant
2015-12-26 22:40:37 +01:00
Fabien Potencier 1e90f3252f minor #1947 remove php 5.2 compatibility for filesystemhelper (Tobion)
This PR was merged into the 2.0-dev branch.

Discussion
----------

remove php 5.2 compatibility for filesystemhelper

#1945 for 2.x

Commits
-------

4ce9587 remove php 5.2 compatibility for filesystemhelper
2015-12-26 22:39:16 +01:00
Tobias Schultze 4ce9587fe5 remove php 5.2 compatibility for filesystemhelper 2015-12-26 19:07:18 +01:00