Commit Graph

3324 Commits

Author SHA1 Message Date
Miguel Piedrafita 012ca796bf Update license year 2018-01-07 18:54:25 +01:00
Fabien Potencier b36e3eb452 minor #2598 Update advanced.rst (pfwd)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2598).

Discussion
----------

Update advanced.rst

I noticed that the rot13Provider wasn't called correctly as it was trying to access a local variable instead of calling $this

Commits
-------

b42fd643 Update advanced.rst
2017-12-07 07:56:46 -08:00
Peter Fisher b42fd6435e Update advanced.rst
I noticed that the rot13Provider wasn't called correctly as it was trying to access a local variable instead of calling $this
2017-12-07 07:56:46 -08:00
Fabien Potencier 5322c9b4ca updated CHANGELOG 2017-11-12 10:47:15 -08:00
Fabien Potencier 9c2b1dc528 bug #2586 Environment::resolveTemplate now accepts instances of TemplateWrapper (victorwelling)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2586).

Discussion
----------

Environment::resolveTemplate now accepts instances of TemplateWrapper

The [documentation on the include function](https://twig.symfony.com/doc/2.x/functions/include.html) states (on the template expression):
> And if the expression evaluates to a Twig_Template or a Twig_TemplateWrapper instance, Twig will use it directly […]

This is currently broken, as `twig_include` [relies on `resolveTemplate`](https://github.com/twigphp/Twig/blob/31b577863b5ae8d19e2cefd174e95a433f16491f/lib/Twig/Extension/Core.php#L1304), which doesn't handle instances of `TemplateWrapper`. This PR fixes that.

For the sake of completeness: the `include` tag doesn't have this problem, as it relies on the `loadTemplate` method of the `Template` class which _does_ handle this case.

Commits
-------

78a4f2fb Environment::resolveTemplate now accepts instances of TemplateWrapper
2017-11-12 10:30:56 -08:00
Victor Welling 78a4f2fb59 Environment::resolveTemplate now accepts instances of TemplateWrapper 2017-11-12 10:30:50 -08:00
Fabien Potencier acfa0311e7 minor #2562 Change typo in documentation (uthopiko)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2562).

Discussion
----------

Change typo in documentation

In example of use for test_iterable function there is a typo

Commits
-------

8607f13d Change typo in documentation
2017-11-12 10:27:33 -08:00
Asier Ramos 8607f13db7 Change typo in documentation
In example of use for test_iterable function there is a typo
2017-11-12 10:27:33 -08:00
Fabien Potencier 7014fda0af minor #2570 fix grammar (redbrickone)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2570).

Discussion
----------

fix grammar

Commits
-------

d4309898 fix grammar
2017-11-12 10:24:46 -08:00
Chris Wright d430989818 fix grammar 2017-11-12 10:24:45 -08:00
Fabien Potencier 2610f2e128 minor #2582 Fix PHP 5.3 Travis build (c960657)
This PR was merged into the 1.x branch.

Discussion
----------

Fix PHP 5.3 Travis build

PHP 5.3 is only supported on Debian Precise.

Commits
-------

3a45bd48 Fix PHP 5.3 build
2017-11-07 13:50:11 -08:00
Christian Schmidt 3a45bd48cf Fix PHP 5.3 build 2017-11-07 22:28:59 +01:00
Fabien Potencier e7944a1f67 bumped version to 1.35.1-DEV 2017-09-27 11:07:18 -07:00
Fabien Potencier daa657073e prepared the 1.35.0 release v1.35.0 2017-09-27 11:06:46 -07:00
Fabien Potencier 8a47e05b73 minor #2557 add throws tags doc block for Twig_Environment:load (Haehnchen)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2557).

Discussion
----------

add throws tags doc block for Twig_Environment:load

On an internal project review we noticed that `\Twig_Environment::load` is not providing throw tags. As this method is just a proxy for `\Twig_Environment::loadTemplate` which itself is _internal_ we had some discussion around.

this PR provides same throw tags as _loadTemplate_. Maybe this helps to understand code usage

Commits
-------

882c7aab add throws tags doc block for Twig_Environment:load
2017-09-27 10:58:47 -07:00
Daniel Espendiller 882c7aab2a add throws tags doc block for Twig_Environment:load 2017-09-27 10:58:47 -07:00
Fabien Potencier a726fc51bb added missing item in CHANGELOG 2017-09-27 10:48:29 -07:00
Fabien Potencier 70e735e39f feature #2560 Added pssibility to reset the profiler (derrabus)
This PR was merged into the 1.x branch.

Discussion
----------

Added pssibility to reset the profiler

In order to implement symfony/symfony#18244 properly, I needed the ability to reset a Twig profile.

Commits
-------

ea922bb6 Added pssibility to reset the profiler.
2017-09-27 10:47:04 -07:00
Alexander M. Turek ea922bb6eb Added pssibility to reset the profiler. 2017-09-22 16:29:04 +02:00
Fabien Potencier cd06d3c696 bug #2543 Ensure that the "use" TokenParser returns a node instance (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Ensure that the "use" TokenParser returns a node instance

Alternative to #2539, fixes #2538.

Commits
-------

421d8722 ensured that the use TokenParser returns a node instance
2017-08-19 19:37:14 +02:00
Fabien Potencier 421d8722f0 ensured that the use TokenParser returns a node instance 2017-08-19 19:36:32 +02:00
Fabien Potencier 96f1a5b486 minor #2544 simplified tests as min version if now 5.3.3 (fabpot)
This PR was squashed before being merged into the 1.x branch (closes #2544).

Discussion
----------

simplified tests as min version if now 5.3.3

fixes #2526

Commits
-------

a3548a6e fixed CS
90a07d16 simplified tests as min version if now 5.3.3
2017-08-16 09:28:55 +02:00
Fabien Potencier a3548a6e23 fixed CS 2017-08-16 08:33:11 +02:00
Fabien Potencier 90a07d166d simplified tests as min version if now 5.3.3 2017-08-16 08:30:52 +02:00
Fabien Potencier 02042e5126 feature #2519 Added RuntimeExtensionInterface (lyrixx)
This PR was merged into the 1.x branch.

Discussion
----------

Added RuntimeExtensionInterface

Commits
-------

6f08f574 Added RuntimeExtensionInterface
2017-08-16 08:19:23 +02:00
Fabien Potencier 16bfb101f0 bumped version to 1.35 2017-08-16 08:18:33 +02:00
Fabien Potencier 73ab3a1215 minor #2536 show how to use a variable as hash map key (tolry)
This PR was submitted for the 2.x branch but it was squashed and merged into the 1.x branch instead (closes #2536).

Discussion
----------

show how to use a variable as hash map key

currently the documentation does not explain how it's possible to use a variable as key in a hash map

Commits
-------

ef6c9505 show how to use a variable as hash map key
2017-08-02 20:11:46 +02:00
Tobias Olry ef6c950505 show how to use a variable as hash map key 2017-08-02 20:11:29 +02:00
Grégoire Pineau 6f08f5745c Added RuntimeExtensionInterface 2017-07-22 11:19:18 +02:00
Fabien Potencier 6e17134b1a updated CHANGELOG 2017-07-22 09:30:43 +02:00
Fabien Potencier d632fd3c33 feature #2530 Throw exception on circular reference detection (yceruto)
This PR was merged into the 1.x branch.

Discussion
----------

Throw exception on circular reference detection

Out-the-box this isn't common... but into Symfony framework this kind of issue can happen frequently when we're overriding a template from third-party bundle (see main issue https://github.com/symfony/symfony/issues/17557)

```twig
{# app/Resources/AcmeBlogBundle/views/Blog/index.html.twig #}
{% extends '@AcmeBlog/Blog/index.html.twig' %}

{% block title 'New Title' %}
```

This exception avoids inifite loop or maximum execution time for this case, by detecting a recursive loading when a template extends from itself, thinking to override the parent template which has the same namespace + template name.

Commits
-------

074e1fbe Throw exception on circular reference detection
2017-07-22 09:30:00 +02:00
Yonel Ceruto 074e1fbe35 Throw exception on circular reference detection 2017-07-21 12:13:25 -04:00
Fabien Potencier e26c4aa298 minor #2531 Update .travis.yml to deal with missing xdebug config (SpacePossum)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2531).

Discussion
----------

Update .travis.yml to deal with missing xdebug config

lets see if this fixes the nightly test

Commits
-------

1097685b Update .travis.yml
2017-07-20 19:25:08 +02:00
SpacePossum 1097685be0 Update .travis.yml 2017-07-20 19:25:08 +02:00
Fabien Potencier f1703ea411 bumped version to 1.34.5-DEV 2017-07-04 16:20:04 +03:00
Fabien Potencier f878bab48e prepared the 1.34.4 release v1.34.4 2017-07-04 16:19:31 +03:00
Fabien Potencier 64c1a6089f updated CHANGELOG 2017-07-04 16:18:18 +03:00
Fabien Potencier 8c9bb921ea minor #2515 Update internals.rst (pribilinskiy)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2515).

Discussion
----------

Update internals.rst

Missing an opening paren

Commits
-------

b8967bd3 Update internals.rst
2017-06-16 06:42:12 -07:00
Steven Pribilinskiy b8967bd371 Update internals.rst
Missing an opening paren
2017-06-16 06:42:12 -07:00
Fabien Potencier 821fd61cfc minor #2493 Update .php_cs.dist (SpacePossum)
This PR was merged into the 1.x branch.

Discussion
----------

Update .php_cs.dist

following https://github.com/twigphp/Twig/pull/2490#discussion_r119097107
:)

Commits
-------

8539a18f Update .php_cs.dist
2017-06-12 09:58:36 -07:00
Fabien Potencier 53cfceabdf bug #2513 Fix deprecation when using Twig_Profiler_Dumper_Html (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Fix deprecation when using Twig_Profiler_Dumper_Html

Commits
-------

aebec7d8 fixed deprecation when using Twig_Profiler_Dumper_Html
2017-06-12 09:56:04 -07:00
Fabien Potencier aebec7d890 fixed deprecation when using Twig_Profiler_Dumper_Html 2017-06-12 09:49:15 -07:00
Fabien Potencier c84106f2ee minor #2512 Issue in documentation for twig number formatter (simsim2006)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2512).

Discussion
----------

Issue in documentation for twig number formatter

The explaination below my change is correct. Just the output is not correct

Commits
-------

54f0f7ae Create number_format.rst
2017-06-12 08:07:51 -07:00
simsim2006 54f0f7ae1c Create number_format.rst 2017-06-12 08:07:51 -07:00
Fabien Potencier d54355e9e1 bug #2509 Add support for runtime loaders to IntegrationTestCase (emodric)
This PR was merged into the 1.x branch.

Discussion
----------

Add support for runtime loaders to IntegrationTestCase

Adds the ability to provide runtime loaders in `IntegrationTestCase`. Otherwise, there's no way to test extensions that use them.

Fixes #2492

Commits
-------

ff96b34a Add support for runtime loaders to IntegrationTestCase
2017-06-09 08:14:30 -07:00
Edi Modrić ff96b34a62 Add support for runtime loaders to IntegrationTestCase 2017-06-09 10:04:55 +02:00
Fabien Potencier b3cb3d22d7 bumped version to 1.34.4-DEV 2017-06-07 11:45:59 -07:00
Fabien Potencier 451c6f4197 prepared the 1.34.3 release v1.34.3 2017-06-07 11:45:17 -07:00
Fabien Potencier a9fe0a9166 bug #2507 Move class_exists() at the bottom of files (nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Move class_exists() at the bottom of files

Fixes #2503
Closes #2506

Commits
-------

95e912b0 Move class_exists() at the bottom of files
2017-06-07 09:29:28 -07:00
Nicolas Grekas 95e912b002 Move class_exists() at the bottom of files 2017-06-07 17:54:42 +02:00