summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-09-19 09:28:20 +0200
committerRemi Collet <fedora@famillecollet.com>2016-09-19 09:28:20 +0200
commit6ee527b9e6d5fa92eab933ac32ac44586e73cf06 (patch)
treeb2fe93a8f9e6f366884d1197b2598026a662796c
parent786491f32538fbd8479ac4fa6622eb7ce9784774 (diff)
php-nikic-php-parser: 2.1.1
-rw-r--r--php-nikic-php-parser-upstream.patch64
-rw-r--r--php-nikic-php-parser.spec29
2 files changed, 20 insertions, 73 deletions
diff --git a/php-nikic-php-parser-upstream.patch b/php-nikic-php-parser-upstream.patch
deleted file mode 100644
index 8206723..0000000
--- a/php-nikic-php-parser-upstream.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From e45e31c218dc224f20155b932e309438fe2eeeb2 Mon Sep 17 00:00:00 2001
-From: Nikita Popov <nikita.ppv@googlemail.com>
-Date: Wed, 20 Apr 2016 15:03:18 +0200
-Subject: [PATCH] Fix new.test and code test runner
-
-Using only the basename leads to collisions...
----
- test/PhpParser/CodeTestAbstract.php | 5 +++--
- test/code/parser/expr/new.test | 6 ++++++
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/test/PhpParser/CodeTestAbstract.php b/test/PhpParser/CodeTestAbstract.php
-index 4395ad3..369ee41 100644
---- a/test/PhpParser/CodeTestAbstract.php
-+++ b/test/PhpParser/CodeTestAbstract.php
-@@ -5,13 +5,14 @@
- abstract class CodeTestAbstract extends \PHPUnit_Framework_TestCase
- {
- protected function getTests($directory, $fileExtension) {
-+ $directory = realpath($directory);
- $it = new \RecursiveDirectoryIterator($directory);
- $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::LEAVES_ONLY);
- $it = new \RegexIterator($it, '(\.' . preg_quote($fileExtension) . '$)');
-
- $tests = array();
- foreach ($it as $file) {
-- $fileName = realpath($file->getPathname());
-+ $fileName = $file->getPathname();
- $fileContents = file_get_contents($fileName);
- $fileContents = canonicalize($fileContents);
-
-@@ -29,7 +30,7 @@ function($matches) {
-
- // first part is the name
- $name = array_shift($parts) . ' (' . $fileName . ')';
-- $shortName = basename($fileName, '.test');
-+ $shortName = ltrim(str_replace($directory, '', $fileName), '/\\');
-
- // multiple sections possible with always two forming a pair
- $chunks = array_chunk($parts, 2);
-diff --git a/test/code/parser/expr/new.test b/test/code/parser/expr/new.test
-index b7ce7a9..a132bbb 100644
---- a/test/code/parser/expr/new.test
-+++ b/test/code/parser/expr/new.test
-@@ -50,6 +50,9 @@ array(
- )
- args: array(
- )
-+ comments: array(
-+ 0: // class name variations
-+ )
- )
- 3: Expr_New(
- class: Expr_ArrayDimFetch(
-@@ -84,6 +87,9 @@ array(
- )
- args: array(
- )
-+ comments: array(
-+ 0: // DNCR object access
-+ )
- )
- 6: Expr_New(
- class: Expr_PropertyFetch(
diff --git a/php-nikic-php-parser.spec b/php-nikic-php-parser.spec
index 80de961..be08188 100644
--- a/php-nikic-php-parser.spec
+++ b/php-nikic-php-parser.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 47b254ea51f1d6d5dc04b9b299e88346bf2369e3
+%global gh_commit 4dd659edadffdc2143e4753df655d866dbfeedf0
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nikic
%global gh_project PHP-Parser
@@ -22,8 +22,8 @@
%endif
Name: php-%{gh_owner}-%{pk_project}
-Version: 2.1.0
-Release: 4%{?dist}
+Version: 2.1.1
+Release: 1%{?dist}
Summary: A PHP parser written in PHP
Group: Development/Libraries
@@ -34,8 +34,6 @@ Source: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# Autoloader
Patch0: %{name}-rpm.patch
-Patch1: %{name}-upstream.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if %{with_tests}
@@ -94,7 +92,6 @@ Autoloader: %{php_home}/PhpParser2/autoload.php
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
-%patch1 -p1 -b .upstream
%if ! %{script}
chmod -x bin/*
@@ -130,11 +127,22 @@ php bin/php-parse-test --help
sed -e 's:@BUILDROOT@:%{buildroot}:' -i test/bootstrap.php
: Upstream test suite
+# remirepo:11
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
%{_bindir}/phpunit --verbose
-
-if which php70; then
- php70 %{_bindir}/phpunit --verbose
+# remirepo:2
fi
+exit $ret
%else
: Test suite disabled
%endif
@@ -159,6 +167,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Sep 19 2016 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
+- update to 2.1.1
+
* Fri May 20 2016 Remi Collet <remi@fedoraproject.org> - 2.1.0-3
- add the php-parse command, no more in php-nikic-php-parser