This commit is contained in:
Remi Collet 2020-09-21 11:24:54 +02:00
commit a167bdccf2
3 changed files with 18 additions and 9 deletions

View file

@ -10,7 +10,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
%global gh_commit 88e519766fc58bd46b8265561fb79b54e2e00b28
%global gh_commit 1c13d05035deff45f1230ca68bd7d74d621762d9
%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.9.1
Version: 4.10.0
Release: 1%{?dist}
Summary: A PHP parser written in PHP - version %{major}
@ -89,7 +89,7 @@ Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php
%build
: Generate an simple PSR-4 autoloader
: Generate an simple classmap autoloader
phpab --template fedora \
--output lib/%{ns_project}/autoload.php \
lib/%{ns_project}
@ -115,19 +115,24 @@ php bin/php-parse-test --help
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
# ignore test failing on 32-bit (in koji)
BITS=$(php -r 'echo PHP_INT_SIZE;')
if [ $BITS -lt 8 ]; then
# ignore test failing on 32-bit (in koji)
FILTER="--filter '^((?!(testParse|testLexNewFeatures)).)*$'"
else
FILTER=""
fi
ret=0
for cmdarg in "php %{phpunit}" "php72%{_bindir}/phpunit8" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit9} \
--filter '^((?!(testParse|testLexNewFeatures)).)*$' \
--verbose || ret=1
$1 -d auto_prepend_file=%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php \
${2:-%{_bindir}/phpunit9} $FILTER --verbose || ret=1
fi
done
exit $ret
@ -145,6 +150,9 @@ exit $ret
%changelog
* Sun Sep 20 2020 Remi Collet <remi@remirepo.net> - 4.10.0-1
- update to 4.10.0
* Mon Aug 31 2020 Remi Collet <remi@remirepo.net> - 4.9.1-1
- update to 4.9.1