Commit Graph

3469 Commits

Author SHA1 Message Date
Fabien Potencier 2a05ea563d minor #2348 remove condition on PHP version (MatTheCat)
This PR was merged into the 2.x branch.

Discussion
----------

remove condition on PHP version

Twig now requires PHP >= 7 so there is no need to check for prior version.

Commits
-------

df185584 remove condition on PHP version
2017-01-10 07:05:50 -08:00
Mathieu df1855840e remove condition on PHP version
Twig now requires PHP >= 7 so there is no need to check for prior version.
2017-01-10 12:07:12 +01:00
Fabien Potencier a058fde56f minor #2346 Typehint the function, filter and test names as string (stof)
This PR was merged into the 2.x branch.

Discussion
----------

Typehint the function, filter and test names as string

This gives faster feedback when using the class in a wrong way, instead of getting a ``Warning: Illegal offset type in ExtensionSet.php line 434`` during the function registration (see https://github.com/symfony/symfony/issues/21212 for a case getting this message)

Commits
-------

2b4642c3 Typehint the function, filter and test names as string
2017-01-09 12:30:07 -08:00
Christophe Coevoet 2b4642c3ec Typehint the function, filter and test names as string 2017-01-09 17:16:00 +01:00
Fabien Potencier 9a311813d1 minor #2332 Fix class names to use non-1.x ones (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Fix class names to use non-1.x ones

Commits
-------

5c8a6249 fixed class names
2017-01-05 11:52:29 -08:00
Fabien Potencier 5c8a624963 fixed class names 2017-01-05 11:38:57 -08:00
Fabien Potencier 470955735a fixed typo 2017-01-05 11:25:04 -08:00
Fabien Potencier 48b2f5cef0 added the missing deprecated doc 2017-01-05 09:36:31 -08:00
Fabien Potencier 303115cf6c bumped version to 2.0.1-DEV 2017-01-05 09:13:42 -08:00
Fabien Potencier 2a86dde128 prepared the 2.0.0 release v2.0.0 2017-01-05 09:12:02 -08:00
Fabien Potencier ae0b2f08e0 Merge branch '1.x' into 2.x
* 1.x:
  tweaked PHP CS Fixer rules
2017-01-04 14:06:08 -08:00
Fabien Potencier cfd709b16e tweaked PHP CS Fixer rules 2017-01-04 14:05:59 -08:00
Fabien Potencier ad0564a7ee Merge branch '1.x' into 2.x
* 1.x:
  updated copyright year
  Minor typo in class name
  fixed CS
2017-01-02 12:22:25 -08:00
Fabien Potencier 4528cc717d updated copyright year 2017-01-02 12:22:20 -08:00
Fabien Potencier 5d1f37c881 minor #2322 Minor typo in class name (BenjaminPaap)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2322).

Discussion
----------

Minor typo in class name

Commits
-------

ce90852 Minor typo in class name
2016-12-29 22:21:24 +01:00
Benjamin Paap ce90852541 Minor typo in class name 2016-12-29 22:21:24 +01:00
Fabien Potencier 91938100bb fixed CS 2016-12-27 11:58:11 +01:00
Fabien Potencier b8bd97eaa0 Merge branch '1.x' into 2.x
* 1.x:
  Optimize usage of Traversable/Iterator
  Fix typo in phpdoc
  fix C89 compat
2016-12-27 11:56:33 +01:00
Fabien Potencier 289dad5898 minor #2265 Optimize usage of Traversable/Iterator (SpacePossum)
This PR was squashed before being merged into the 1.x branch (closes #2265).

Discussion
----------

Optimize usage of Traversable/Iterator

Commits
-------

2bdcfb6 Optimize usage of Traversable/Iterator
2016-12-27 11:56:08 +01:00
SpacePossum 2bdcfb6743 Optimize usage of Traversable/Iterator 2016-12-27 11:56:06 +01:00
Fabien Potencier cbb7c9cf25 fixed CS 2016-12-27 08:19:00 +01:00
Fabien Potencier 5268900793 minor #2319 Fix typo in phpdoc (chalasr)
This PR was merged into the 1.x branch.

Discussion
----------

Fix typo in phpdoc

Commits
-------

6a720ab Fix typo in phpdoc
2016-12-26 08:10:59 +01:00
Robin Chalas 6a720ab263 Fix typo in phpdoc 2016-12-25 11:15:02 +01:00
Fabien Potencier 166922bcfe feature #2318 removed remaining mentions of the C extension (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

removed remaining mentions of the C extension

Commits
-------

57ebf00 removed remaining mentions of the C extension
2016-12-24 11:36:01 +01:00
Fabien Potencier ae05130032 bug #2317 fix C89 compat (Jan-E)
This PR was merged into the 1.x branch.

Discussion
----------

fix C89 compat

@tucksaun @fabpot The extension did not compile anymore with old MSVC compilers. This PR contains the fix.

Commits
-------

c6be57f fix C89 compat
2016-12-24 11:35:17 +01:00
Fabien Potencier e36f33dae0 fixed composer.json 2016-12-24 09:32:21 +01:00
Fabien Potencier 8aee0809c3 fixed version in documentation 2016-12-24 09:08:07 +01:00
Fabien Potencier 4411071959 Merge branch '1.x' into 2.x
* 1.x:
  fixed composer.json
  bumped version to 1.30.1-DEV
  prepared the 1.30.0 release
2016-12-24 09:07:51 +01:00
Fabien Potencier b42bacec7f fixed composer.json 2016-12-24 09:07:02 +01:00
Fabien Potencier 57ebf004e7 removed remaining mentions of the C extension 2016-12-24 08:57:01 +01:00
Jan-E c6be57f903 fix C89 compat 2016-12-24 06:16:32 +01:00
Fabien Potencier 73e9104baa feature #2316 moved Twig_Template::getAttribute() to a function (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

moved Twig_Template::getAttribute() to a function

Commits
-------

6405684 moved Twig_Template::getAttribute() to a function
2016-12-23 12:18:13 +01:00
Fabien Potencier 2cbc573aa5 bumped version to 1.30.1-DEV 2016-12-23 12:16:08 +01:00
Fabien Potencier c6ff71094f prepared the 1.30.0 release v1.30.0 2016-12-23 12:06:22 +01:00
Fabien Potencier 1055dd5767 Merge branch '1.x' into 2.x
* 1.x:
  fixed CS
  updated CHANGELOG
  Add a Twig_FactoryRuntimeLoader
2016-12-23 11:51:01 +01:00
Fabien Potencier 640568437f moved Twig_Template::getAttribute() to a function 2016-12-23 11:50:47 +01:00
Fabien Potencier 45bfef5e8d minor #2315 modified code to use variadics when possible (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

modified code to use variadics when possible

Commits
-------

a002d59 modified code to use variadics when possible
2016-12-23 09:17:23 +01:00
Fabien Potencier 72762d6c2c fixed CS 2016-12-23 09:12:13 +01:00
Fabien Potencier d9e56ac6ac updated CHANGELOG 2016-12-23 09:11:24 +01:00
Fabien Potencier 2fd05fdd05 feature #2311 Add a simple Twig_RuntimeLoaderInterface implementation (chalasr)
This PR was merged into the 1.x branch.

Discussion
----------

Add a simple Twig_RuntimeLoaderInterface implementation

Next to https://github.com/symfony/symfony/pull/21023

This is related to the BC break reported in symfony/symfony#21008 which has been introduced in symfony/symfony#20093 when decoupling extensions from definitions.

What I propose here is to ease the upgrade to symfony 3.2+ by adding a simple `Twig_RuntimeLoaderInterface` implementation here, useful only when using the twig-bridge outside of the symfony fullstack framework (with the Form component for instance).

Upgrading would be as simple as:

```diff
$twig = new Twig_Environment(...);
$rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig'), $twig);
- $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager)));
+ $twig->addExtension(new FormExtension());
+ $twig->addRuntimeLoader(new Twig_RuntimeLoader(array(TwigRenderer::class => new TwigRenderer($rendererEngine, $csrfTokenManager)));
```

Instead of having to write this runtime loader yourself.
Please see symfony/symfony#21008 for details and a concrete example of how this could help.

Commits
-------

91c8d59 Add a Twig_FactoryRuntimeLoader
2016-12-23 09:11:01 +01:00
Fabien Potencier f03ddaef43 Merge branch '1.x' into 2.x
* 1.x:
  added more final classes
  add a comma to clarify the meaning
2016-12-23 09:06:20 +01:00
Fabien Potencier 0457888fc3 added more final classes 2016-12-23 09:05:03 +01:00
Fabien Potencier 3824a4c2b7 minor #2314 add a comma to clarify the meaning (xabbuh)
This PR was merged into the 1.x branch.

Discussion
----------

add a comma to clarify the meaning

Without the comma you could understand that the "if" not only applied
to `-1`, but to `1` as well if you read too quickly.

Commits
-------

7cd3c9d add a comma to clarify the meaning
2016-12-23 08:57:59 +01:00
Fabien Potencier a002d591f7 modified code to use variadics when possible 2016-12-23 08:53:30 +01:00
Christian Flothmann 7cd3c9d25f add a comma to clarify the meaning
Without the comma you could understand that the "if" not only applied
to `-1`, but to `1` as well if you read too quickly.
2016-12-23 08:52:50 +01:00
Fabien Potencier 0f398a3463 Merge branch '1.x' into 2.x
* 1.x:
  removed unnneeded phpdocs
2016-12-23 08:11:22 +01:00
Fabien Potencier c88edc8c75 removed unnneeded phpdocs 2016-12-23 08:09:25 +01:00
Fabien Potencier b7a5597f09 Merge branch '1.x' into 2.x
* 1.x:
  tweaked a deprecation notice
  added more docs about the range function
2016-12-23 07:53:11 +01:00
Fabien Potencier 97a8c53ec6 tweaked a deprecation notice 2016-12-23 07:51:44 +01:00
Fabien Potencier 40348480e7 added more docs about the range function 2016-12-23 07:21:48 +01:00