summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-phpstan-phpdoc-parser.spec20
1 files changed, 16 insertions, 4 deletions
diff --git a/php-phpstan-phpdoc-parser.spec b/php-phpstan-phpdoc-parser.spec
index 1f9541d..f6049df 100644
--- a/php-phpstan-phpdoc-parser.spec
+++ b/php-phpstan-phpdoc-parser.spec
@@ -1,6 +1,6 @@
# remirepo/Fedora spec file for php-phpstan-phpdoc-parser
#
-# Copyright (c) 2023 Remi Collet
+# Copyright (c) 2023-2024 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -9,7 +9,7 @@
%bcond_without tests
-%global gh_commit fedf211ff14ec8381c9bf5714e33a7a552dd1acc
+%global gh_commit bd84b629c8de41aa2ae82c067c955e06f1b00240
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpstan
%global gh_project phpdoc-parser
@@ -19,7 +19,7 @@
%global major %nil
Name: php-%{gh_owner}-%{gh_project}%{major}
-Version: 1.24.5
+Version: 1.25.0
Release: 1%{?dist}
Summary: PHPDoc parser with support for nullable, intersection and generic types
@@ -48,6 +48,13 @@ BuildRequires: php-pcre
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9 >= 9.5
%endif
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(nikic/php-parser) >= 4.15 with php-composer(nikic/php-parser) < 5)
+# remirepo:3
+%else
+BuildRequires: php-nikic-php-parser4 >= 4.15
+%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -86,6 +93,8 @@ cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}%{major}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
+// to avoid v5 from PHPUnit
+require_once '%{php_home}/PhpParser4/autoload.php';
require_once '%{buildroot}%{php_home}/%{namespace}/%{library}%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{namespace}\\%{library}\\', dirname(__DIR__) . '/tests/%{namespace}');
EOF
@@ -101,7 +110,7 @@ ret=0
for cmdarg in "php %{phpunit}" php81 php82 php83; do
if which $cmdarg; then
set $cmdarg
- $1 -d auto_prepend_file=%{buildroot}%{php_home}/%{namespace}/%{library}%{major}/autoload.php \
+ $1 -d auto_prepend_file=vendor/autoload.php \
${2:-%{_bindir}/phpunit9} \
-d memory_limit=1G \
--filter '^((?!(testDoctrine)).)*$' \
@@ -126,6 +135,9 @@ exit $ret
%changelog
+* Fri Jan 5 2024 Remi Collet <remi@remirepo.net> - 1.25.0-1
+- update to 1.25.0
+
* Mon Dec 18 2023 Remi Collet <remi@remirepo.net> - 1.24.5-1
- update to 1.24.5