From 367b963103093a930ab994ba8c2c19e1e4d82999 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Nov 2015 15:42:17 +0100 Subject: [PATCH] v1.23.1 --- .gitignore | 2 ++ php-twig-upstream.patch | 72 ----------------------------------------- php-twig.spec | 13 ++++---- sources | 2 +- 4 files changed, 9 insertions(+), 80 deletions(-) delete mode 100644 php-twig-upstream.patch diff --git a/.gitignore b/.gitignore index 7888a85..9124969 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +clog /php-twig-1.16.0-8ce37115802e257a984a82d38254884085060024.tar.gz /php-twig-1.16.2-42f758d9fe2146d1f0470604fc05ee43580873fc.tar.gz /php-twig-1.16.3-6dc11a1e8ecfc30e2c68aaeb218148409d8e68af.tar.gz @@ -6,3 +7,4 @@ /php-twig-1.21.2-ddce1136beb8db29b9cd7dffa8ab518b978c9db3.tar.gz /php-twig-1.22.2-79249fc8c9ff62e41e217e0c630e2e00bcadda6a.tar.gz /php-twig-1.23.0-5868cd822fd6cf626d5f805439575f9c323cee2a.tar.gz +/php-twig-1.23.1-d9b6333ae8dd2c8e3fd256e127548def0bc614c6.tar.gz diff --git a/php-twig-upstream.patch b/php-twig-upstream.patch deleted file mode 100644 index 688d9c2..0000000 --- a/php-twig-upstream.patch +++ /dev/null @@ -1,72 +0,0 @@ -From ee5e25eb4681b41a7408cd08d4d10ef3d216d3eb Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Mon, 2 Nov 2015 15:13:46 +0100 -Subject: [PATCH] fix BC, revert to pre 1.23 behavior, and make use of pattern - an option - ---- - lib/Twig/Test/NodeTestCase.php | 12 ++++++++---- - test/Twig/Tests/Node/ModuleTest.php | 6 +++--- - 2 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/lib/Twig/Test/NodeTestCase.php b/lib/Twig/Test/NodeTestCase.php -index 6fe1b5f..e591c1d 100644 ---- a/lib/Twig/Test/NodeTestCase.php -+++ b/lib/Twig/Test/NodeTestCase.php -@@ -15,17 +15,21 @@ - /** - * @dataProvider getTests - */ -- public function testCompile($node, $source, $environment = null) -+ public function testCompile($node, $source, $environment = null, $isPattern = false) - { -- $this->assertNodeCompilation($source, $node, $environment); -+ $this->assertNodeCompilation($source, $node, $environment, $isPattern); - } - -- public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null) -+ public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null, $isPattern = false) - { - $compiler = $this->getCompiler($environment); - $compiler->compile($node); - -- $this->assertStringMatchesFormat($source, trim($compiler->getSource())); -+ if ($isPattern) { -+ $this->assertStringMatchesFormat($source, trim($compiler->getSource())); -+ } else { -+ $this->assertEquals($source, trim($compiler->getSource())); -+ } - } - - protected function getCompiler(Twig_Environment $environment = null) -diff --git a/test/Twig/Tests/Node/ModuleTest.php b/test/Twig/Tests/Node/ModuleTest.php -index ca784e5..35b3e2e 100644 ---- a/test/Twig/Tests/Node/ModuleTest.php -+++ b/test/Twig/Tests/Node/ModuleTest.php -@@ -75,7 +75,7 @@ public function getDebugInfo() - } - } - EOF -- , $twig); -+ , $twig, true); - - $import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 1), new Twig_Node_Expression_AssignName('macro', 1), 2); - -@@ -128,7 +128,7 @@ public function getDebugInfo() - } - } - EOF -- , $twig); -+ , $twig, true); - - $set = new Twig_Node_Set(false, new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 4))), new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 4))), 4); - $body = new Twig_Node(array($set)); -@@ -176,7 +176,7 @@ public function getDebugInfo() - } - } - EOF -- , $twig); -+ , $twig, true); - - return $tests; - } diff --git a/php-twig.spec b/php-twig.spec index 82ddedd..a95648d 100644 --- a/php-twig.spec +++ b/php-twig.spec @@ -12,8 +12,8 @@ %global github_owner twigphp %global github_name Twig -%global github_version 1.23.0 -%global github_commit 5868cd822fd6cf626d5f805439575f9c323cee2a +%global github_version 1.23.1 +%global github_commit d9b6333ae8dd2c8e3fd256e127548def0bc614c6 # Lib %global composer_vendor twig @@ -47,9 +47,6 @@ License: BSD URL: http://twig.sensiolabs.org Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -# https://github.com/twigphp/Twig/pull/1905 (merged) -Patch0: %{name}-upstream.patch - BuildRequires: php-devel >= %{php_min_ver} # Tests %if %{with_tests} @@ -129,8 +126,6 @@ Obsoletes: php-channel-twig %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 - : Ext -- NTS mv ext/%{ext_name} ext/NTS %if %{with_zts} @@ -251,6 +246,10 @@ sed 's/function testGetAttributeWithTemplateAsObject/function SKIP_testGetAttrib %changelog +* Thu Nov 05 2015 Remi Collet - 1.23.1-1 +- Update to 1.23.0 +- drop patch merged upstream + * Mon Nov 2 2015 Remi Collet - 1.23.0-2 - fix BC break in NodeTestCase, add upstream patch from https://github.com/twigphp/Twig/pull/1905 diff --git a/sources b/sources index 0512c9f..0b75bc1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0d5dbcef4afc5d717d5fd1907f4de08 php-twig-1.23.0-5868cd822fd6cf626d5f805439575f9c323cee2a.tar.gz +33acd115e315a82f0e89663a98e3cbfe php-twig-1.23.1-d9b6333ae8dd2c8e3fd256e127548def0bc614c6.tar.gz