diff --git a/.gitignore b/.gitignore index 01cc9cd..9aae347 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,22 @@ clog /php-nikic-php-parser4-4.10.2-658f1be.tgz /php-nikic-php-parser4-4.10.3-dbe56d2.tgz /php-nikic-php-parser4-4.10.4-c6d052f.tgz +/php-nikic-php-parser4-4.10.5-4432ba3.tgz +/php-nikic-php-parser4-4.11.0-fe14cf3.tgz +/php-nikic-php-parser4-4.12.0-6608f01.tgz +/php-nikic-php-parser4-4.13.0-50953a2.tgz +/php-nikic-php-parser4-4.13.1-63a79e8.tgz +/php-nikic-php-parser4-4.13.2-210577f.tgz +/php-nikic-php-parser4-4.14.0-34bea19.tgz +/php-nikic-php-parser4-4.15.1-0ef6c55.tgz +/php-nikic-php-parser4-4.15.2-f59bbe4.tgz +/php-nikic-php-parser4-4.15.3-570e980.tgz +/php-nikic-php-parser4-4.15.4-6bb5176.tgz +/php-nikic-php-parser4-4.15.5-11e2663.tgz +/php-nikic-php-parser4-4.16.0-19526a3.tgz +/php-nikic-php-parser4-4.17.1-a6303e5.tgz +/php-nikic-php-parser4-4.18.0-1bcbb21.tgz +/php-nikic-php-parser4-4.19.1-4e1b88d.tgz +/php-nikic-php-parser4-4.19.2-0ed4c89.tgz +/php-nikic-php-parser4-4.19.4-715f4d2.tgz +/php-nikic-php-parser4-4.19.5-51bd93c.tgz diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec index 34cb616..5658e8c 100644 --- a/php-nikic-php-parser4.spec +++ b/php-nikic-php-parser4.spec @@ -1,31 +1,35 @@ # remirepo/fedora spec file for php-nikic-php-parser4 # -# Copyright (c) 2016-2020 Remi Collet -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -# For compatibility with SCL -%undefine __brp_mangle_shebangs -%global gh_commit c6d052fc58cb876152f89f532b95a8d7907e7f0e +%if 0%{?fedora} +%bcond_without tests +%else +# disabled as phpunit not availble +%bcond_with tests +%endif + +%global gh_commit 51bd93cc741b7fc3d63d20b6bdcd99fdaa359837 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner nikic %global gh_project PHP-Parser %global pk_project php-parser %global php_home %{_datadir}/php %global ns_project PhpParser -%global with_tests 0%{!?_without_tests:1} %global major 4 Name: php-%{gh_owner}-%{pk_project}%{major} -Version: 4.10.4 +Version: 4.19.5 Release: 1%{?dist} Summary: A PHP parser written in PHP - version %{major} -License: BSD +License: BSD-3-Clause URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh @@ -34,10 +38,10 @@ Source1: makesrc.sh Patch0: %{name}-rpm.patch BuildArch: noarch -%if %{with_tests} +%if %{with tests} # For tests -# as we use phpunit8 -BuildRequires: php(language) >= 7.2 +# as we use phpunit9 +BuildRequires: php(language) >= 7.3 BuildRequires: php-tokenizer BuildRequires: php-reflection BuildRequires: php-ctype @@ -45,18 +49,18 @@ BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl # From composer.json, "require-dev": { -# "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", +# "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", # "ircmaxell/php-yacc": "0.0.7" -%global phpunit %{_bindir}/phpunit8 -BuildRequires: phpunit8 +%global phpunit %{_bindir}/phpunit9 +BuildRequires: phpunit9 # Autoloader -BuildRequires: php-fedora-autoloader-devel %endif +BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { -# "php": ">=7.0", +# "php": ">=7.1", # "ext-tokenizer": "*" -Requires: php(language) >= 7.0 +Requires: php(language) >= 7.1 Requires: php-tokenizer # From phpcompatinfo report for version 4.0.0 Requires: php-reflection @@ -72,7 +76,7 @@ Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} %description -This is a PHP 5.2 to PHP 7.4 parser written in PHP. +This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. This package provides the library version %{major} and the php-parse%{major} command. @@ -85,7 +89,7 @@ Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 -b .rpm +%patch -P0 -p1 -b .rpm %build @@ -105,7 +109,7 @@ install -Dpm 0755 bin/php-parse %{buildroot}%{_bindir}/php-parse%{major} %check -%if %{with_tests} +%if %{with tests} : Test the command sed -e 's:%{php_home}:%{buildroot}%{php_home}:' \ bin/php-parse > bin/php-parse-test @@ -119,19 +123,14 @@ cat << 'AUTOLOAD' | tee vendor/autoload.php AUTOLOAD : Upstream test suite -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 +FILTER="--filter '^((?!(testLexNewFeatures)).)*$'" ret=0 -for cmdarg in "php %{phpunit}" "php72%{_bindir}/phpunit8" php73 php74 php80; do +for cmdarg in "php %{phpunit}" php81 php82 php83 php84 php85; do if which $cmdarg; then set $cmdarg - $1 -d auto_prepend_file=%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php \ + $1 -d include_path=%{php_home} \ + -d auto_prepend_file=%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php \ ${2:-%{_bindir}/phpunit9} $FILTER --verbose || ret=1 fi done @@ -150,6 +149,99 @@ exit $ret %changelog +* Tue Dec 9 2025 Remi Collet - 4.19.5-1 +- update to 4.19.5 +- re-license spec file to CECILL-2.1 + +* Fri Jul 25 2025 Fedora Release Engineering - 4.19.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 4.19.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Sep 30 2024 Remi Collet - 4.19.4-1 +- update to 4.19.4 + +* Wed Sep 18 2024 Remi Collet - 4.19.2-1 +- update to 4.19.2 + +* Fri Jul 19 2024 Fedora Release Engineering - 4.19.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Mar 19 2024 Remi Collet - 4.19.1-1 +- update to 4.19.1 +- raise dependency on PHP 7.1 + +* Thu Jan 25 2024 Fedora Release Engineering - 4.18.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 4.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 11 2023 Remi Collet - 4.18.0-1 +- update to 4.18.0 + +* Fri Aug 18 2023 Remi Collet - 4.17.1-1 +- update to 4.17.1 + +* Fri Jul 21 2023 Fedora Release Engineering - 4.16.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jun 26 2023 Remi Collet - 4.16.0-1 +- update to 4.16.0 + +* Wed May 24 2023 Remi Collet - 4.15.5-1 +- update to 4.15.5 + +* Mon Mar 6 2023 Remi Collet - 4.15.4-1 +- update to 4.15.4 + +* Fri Jan 20 2023 Fedora Release Engineering - 4.15.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 17 2023 Remi Collet - 4.15.3-1 +- update to 4.15.3 + +* Mon Nov 14 2022 Remi Collet - 4.15.2-1 +- update to 4.15.2 + +* Thu Sep 8 2022 Remi Collet - 4.15.1-1 +- update to 4.15.1 + +* Fri Jul 22 2022 Fedora Release Engineering - 4.14.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Remi Collet - 4.14.0-2 +- only run test suite on Fedora, not on EL + +* Wed Jun 1 2022 Remi Collet - 4.14.0-1 +- update to 4.14.0 + +* Fri Jan 21 2022 Fedora Release Engineering - 4.13.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Dec 1 2021 Remi Collet - 4.13.2-1 +- update to 4.13.2 + +* Thu Nov 4 2021 Remi Collet - 4.13.1-1 +- update to 4.13.1 + +* Tue Sep 21 2021 Remi Collet - 4.13.0-1 +- update to 4.13.0 + +* Wed Jul 21 2021 Remi Collet - 4.12.0-1 +- update to 4.12.0 + +* Mon Jul 5 2021 Remi Collet - 4.11.0-1 +- update to 4.11.0 +- switch to phpunit9 + +* Tue May 4 2021 Remi Collet - 4.10.5-1 +- update to 4.10.5 + +* Wed Jan 27 2021 Fedora Release Engineering - 4.10.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Dec 21 2020 Remi Collet - 4.10.4-1 - update to 4.10.4 diff --git a/sources b/sources index 7b8aee1..619d1c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-nikic-php-parser4-4.10.4-c6d052f.tgz) = dcf22d719c5ff3e7e162a751aeaf18fce97d320e79e1c659a7efe30b2de55ebb4efd06a8bb944985400ef00db5c7cb7a611dfd7a4c95fde4c861af51936b426d +SHA512 (php-nikic-php-parser4-4.19.5-51bd93c.tgz) = 739cb8134ca83bfaeb8189dc40ef7603e2c7c7813d28841b279306f6e2d3f77910eb5033aae0c2bad0f38d0dc6490953cc3518bf433c4f99cecf2007c10d17cc