summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json5
-rw-r--r--php-nikic-php-parser4-rpm.patch13
-rw-r--r--php-nikic-php-parser4.spec14
3 files changed, 17 insertions, 15 deletions
diff --git a/composer.json b/composer.json
index 152143e..9742853 100644
--- a/composer.json
+++ b/composer.json
@@ -29,6 +29,11 @@
"PhpParser\\": "lib/PhpParser"
}
},
+ "autoload-dev": {
+ "psr-4": {
+ "PhpParser\\": "test/PhpParser/"
+ }
+ },
"bin": [
"bin/php-parse"
]
diff --git a/php-nikic-php-parser4-rpm.patch b/php-nikic-php-parser4-rpm.patch
index bbdfc8f..66edc42 100644
--- a/php-nikic-php-parser4-rpm.patch
+++ b/php-nikic-php-parser4-rpm.patch
@@ -15,15 +15,4 @@ diff -up ./bin/php-parse.rpm ./bin/php-parse
ini_set('xdebug.max_nesting_level', 3000);
-diff -up ./test/bootstrap.php.rpm ./test/bootstrap.php
---- ./test/bootstrap.php.rpm 2016-04-20 06:33:22.713063604 +0200
-+++ ./test/bootstrap.php 2016-04-20 06:34:38.963385593 +0200
-@@ -2,7 +2,7 @@
-
- namespace PhpParser;
-
--require __DIR__ . '/../vendor/autoload.php';
-+require '@BUILDROOT@/usr/share/php/PhpParser4/autoload.php';
-
- function canonicalize($str) {
- // normalize EOL style
+
diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec
index a94315a..0aa5930 100644
--- a/php-nikic-php-parser4.spec
+++ b/php-nikic-php-parser4.spec
@@ -10,7 +10,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 594bcae1fc0bccd3993d2f0d61a018e26ac2865a
+%global gh_commit 5221f49a608808c1e4d436df32884cbc1b821ac0
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nikic
%global gh_project PHP-Parser
@@ -21,7 +21,7 @@
%global major 4
Name: php-%{gh_owner}-%{pk_project}%{major}
-Version: 4.2.0
+Version: 4.2.1
Release: 1%{?dist}
Summary: A PHP parser written in PHP - version %{major}
@@ -120,7 +120,12 @@ sed -e 's:%{php_home}:%{buildroot}%{php_home}:' \
php bin/php-parse-test --help
: Test suite autoloader
-sed -e 's:@BUILDROOT@:%{buildroot}:' -i test/bootstrap.php
+mkdir vendor
+cat << 'AUTOLOAD' | tee vendor/autoload.php
+<?php
+require_once '%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('%{ns_project}\\', dirname(__DIR__).'/test/PhpParser/');
+AUTOLOAD
: Upstream test suite
ret=0
@@ -147,6 +152,9 @@ exit $ret
%changelog
+* Mon Feb 18 2019 Remi Collet <remi@remirepo.net> - 4.2.1-1
+- update to 4.2.1
+
* Sun Jan 13 2019 Remi Collet <remi@remirepo.net> - 4.2.0-1
- update to 4.2.0