diff --git a/.travis.yml b/.travis.yml index ec234cb9c..19bc5a4fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,9 +27,6 @@ script: ./vendor/bin/simple-phpunit jobs: fast_finish: true include: - - php: 5.4 - - php: 5.4 - env: TWIG_EXT=yes - php: 5.5 - php: 5.5 env: TWIG_EXT=yes diff --git a/CHANGELOG b/CHANGELOG index ff4e92f8e..a200db156 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ * fixed the "empty" test on Traversable instances * fixed cache when opcache is installed but disabled + * upgrade minimal php version to 5.5 * 1.42.2 (2019-06-18) diff --git a/composer.json b/composer.json index be72014d9..9f56365f8 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ } ], "require": { - "php": ">=5.4.0", + "php": ">=5.5.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { diff --git a/doc/intro.rst b/doc/intro.rst index d1f9c59e8..1f52c80a8 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -26,7 +26,7 @@ Slim, Yii, Laravel, and Codeigniter — just to name a few. Prerequisites ------------- -Twig needs at least **PHP 5.4.0** to run. +Twig needs at least **PHP 5.5.0** to run. Installation ------------ diff --git a/tests/NodeVisitor/OptimizerTest.php b/tests/NodeVisitor/OptimizerTest.php index d7bd1e98e..49dbbb264 100644 --- a/tests/NodeVisitor/OptimizerTest.php +++ b/tests/NodeVisitor/OptimizerTest.php @@ -41,21 +41,6 @@ class OptimizerTest extends \PHPUnit\Framework\TestCase $this->assertTrue($node->getAttribute('output')); } - public function testRenderVariableBlockOptimizer() - { - if (\PHP_VERSION_ID >= 50400) { - $this->markTestSkipped('not needed on PHP >= 5.4'); - } - - $env = new Environment($this->getMockBuilder('\Twig\Loader\LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); - $stream = $env->parse($env->tokenize(new Source('{{ block(name|lower) }}', 'index'))); - - $node = $stream->getNode('body')->getNode(0)->getNode(1); - - $this->assertInstanceOf('\Twig\Node\Expression\BlockReferenceExpression', $node); - $this->assertTrue($node->getAttribute('output')); - } - /** * @dataProvider getTestsForForOptimizer */