Commit Graph

3714 Commits

Author SHA1 Message Date
Fabien Potencier 198a98b1df Merge branch '1.x' into 2.x
* 1.x:
  updated CHANGELOG
  Throw exception on circular reference detection
2017-07-22 09:33:34 +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 41ab61bf2d Merge branch '1.x' into 2.x
* 1.x:
  Update .travis.yml
2017-07-20 19:25:32 +02: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 9823bed943 Merge branch '1.x' into 2.x
* 1.x:
  bumped version to 1.34.5-DEV
  prepared the 1.34.4 release
  updated CHANGELOG
  Update internals.rst
2017-07-04 16:21:11 +03: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 a9cca4b3b7 fixed php cs config for 2.x 2017-06-12 09:59:07 -07:00
Fabien Potencier a04d87d96c Merge branch '1.x' into 2.x
* 1.x:
  Update .php_cs.dist
2017-06-12 09:58:53 -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 e6efed69a2 removed @final from Twig_Profiler_Dumper_Text 2017-06-12 09:57:28 -07:00
Fabien Potencier df499fcee7 Merge branch '1.x' into 2.x
* 1.x:
  fixed deprecation when using Twig_Profiler_Dumper_Html
  Create number_format.rst
  Add support for runtime loaders to IntegrationTestCase
2017-06-12 09:56:52 -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 5aad21c1e7 bumped version to 2.4.4-DEV 2017-06-07 11:48:31 -07:00
Fabien Potencier eab7c3288a prepared the 2.4.3 release v2.4.3 2017-06-07 11:47:58 -07:00
Fabien Potencier a13f8ba018 Merge branch '1.x' into 2.x
* 1.x:
  bumped version to 1.34.4-DEV
  prepared the 1.34.3 release
2017-06-07 11:46:42 -07: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 e7e91673d7 Merge branch '1.x' into 2.x
* 1.x:
  Move class_exists() at the bottom of files
  bumped version to 1.34.3-DEV
  prepared the 1.34.2 release
2017-06-07 09:31:45 -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
Fabien Potencier 0c523c5c79 bumped version to 2.4.3-DEV 2017-06-05 20:58:49 -07:00
Fabien Potencier fe3e3f3359 prepared the 2.4.2 release v2.4.2 2017-06-05 20:58:14 -07:00
Fabien Potencier c071a2e36c bumped version to 1.34.3-DEV 2017-06-05 20:57:21 -07:00
Fabien Potencier 55e4beb721 prepared the 1.34.2 release v1.34.2 2017-06-05 20:56:50 -07:00
Fabien Potencier acdf2581c9 replaced require with class_exists 2017-06-05 17:04:54 -07:00
Fabien Potencier 4ec8473a56 Merge branch '1.x' into 2.x
* 1.x:
  replaced require with class_exists
2017-06-05 17:04:25 -07:00
Fabien Potencier e92a13aae9 replaced require with class_exists 2017-06-05 17:04:19 -07:00
Fabien Potencier fd70cf0c60 Merge branch '1.x' into 2.x
* 1.x:
  Use class_exists instead of require
2017-06-05 16:59:17 -07:00
Fabien Potencier 84631789a2 bug #2502 Use class_exists instead of require (ogizanagi)
This PR was merged into the 1.x branch.

Discussion
----------

Use class_exists instead of require

I think this is required for https://github.com/symfony/symfony/pull/23073 to pass. It's probably very similar to https://github.com/symfony/symfony/pull/22657.

A simple reproducer:

```php
<?php

use Twig\Node\Node;

require_once __DIR__ . '/vendor/autoload.php';

new Node();
new \Twig_Node();
```

[Without this patch](https://travis-ci.org/symfony/symfony/jobs/239712676#L2100):

```php
PHP Fatal error:  Cannot declare class Twig_Node, because the name is already in use in vendor/twig/twig/lib/Twig/Node.php on line 20
```

With, everything works fine, whatever the two calls order.

Commits
-------

2c174e40 Use class_exists instead of require
2017-06-05 16:59:01 -07:00
Maxime Steinhausser 2c174e4015 Use class_exists instead of require 2017-06-05 23:42:50 +02:00
Fabien Potencier 7152dead8e bumped version to 2.4.2-DEV 2017-06-05 11:36:13 -07:00
Fabien Potencier 97c5e1f7e2 prepared the 1.34.1 release v2.4.1 2017-06-05 11:29:51 -07:00
Fabien Potencier 69bfa63846 Use class_exists instead of require to play nice with inlining for 2.x 2017-06-05 11:28:28 -07:00
Fabien Potencier 68c7dda466 Merge branch '1.x' into 2.x
* 1.x:
  bumped version to 1.34.2-DEV
  prepared the 1.34.1 release
  updated CHANGELOG
2017-06-05 11:27:04 -07:00
Fabien Potencier 1af645d539 bumped version to 1.34.2-DEV 2017-06-05 11:26:06 -07:00
Fabien Potencier 5c0f990d44 prepared the 1.34.1 release v1.34.1 2017-06-05 11:25:10 -07:00
Fabien Potencier ef183c1c92 updated CHANGELOG 2017-06-05 11:24:34 -07:00
Fabien Potencier 86258ae849 Merge branch '1.x' into 2.x
* 1.x:
  Use class_exists instead of require to play nice with inlining
2017-06-05 11:19:32 -07:00