summaryrefslogtreecommitdiffstats
path: root/php-theseer-autoload.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-theseer-autoload.spec')
-rw-r--r--php-theseer-autoload.spec49
1 files changed, 29 insertions, 20 deletions
diff --git a/php-theseer-autoload.spec b/php-theseer-autoload.spec
index 1059dc2..e857e94 100644
--- a/php-theseer-autoload.spec
+++ b/php-theseer-autoload.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-theseer-autoload
#
-# Copyright (c) 2014-2019 Remi Collet
+# Copyright (c) 2014-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -20,7 +20,7 @@
Name: php-theseer-autoload
Version: 1.25.9
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: A tool and library to generate autoload code
License: BSD
@@ -29,19 +29,24 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# Autoloader path
Patch0: %{gh_project}-rpm.patch
+# PHP 8 compatibility
+Patch1: %{gh_project}-php8.patch
+# Xdebug 3 compatibility
+Patch2: %{gh_project}-xdebug3.patch
BuildArch: noarch
-BuildRequires: php(language) >= 5.3.1
+BuildRequires: php(language) >= 7.2
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+%global phpunit %{_bindir}/phpunit9
+%else
+%global phpunit %{_bindir}/phpunit8
+%endif
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2)
-BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2)
-%global phpunit %{_bindir}/phpunit7
+BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2)
+BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7.1 with php-composer(zetacomponents/console-tools) < 2)
%else
-BuildRequires: php-composer(theseer/directoryscanner) < 2
-BuildRequires: php-composer(theseer/directoryscanner) >= 1.3
-BuildRequires: php-composer(zetacomponents/console-tools) < 2
-BuildRequires: php-composer(zetacomponents/console-tools) >= 1.7
-%global phpunit %{_bindir}/phpunit
+BuildRequires: php-theseer-directoryscanner >= 1.3
+BuildRequires: php-zetacomponents-console-tools >= 1.7.1
%endif
BuildRequires: %{phpunit}
@@ -50,13 +55,11 @@ BuildRequires: %{phpunit}
# "zetacomponents/console-tools": "^1.7.1"
Requires: php(language) >= 5.3.1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2)
-Requires: (php-composer(zetacomponents/console-tools) >= 1.7 with php-composer(zetacomponents/console-tools) < 2)
+Requires: (php-composer(theseer/directoryscanner) >= 1.3 with php-composer(theseer/directoryscanner) < 2)
+Requires: (php-composer(zetacomponents/console-tools) >= 1.7.1 with php-composer(zetacomponents/console-tools) < 2)
%else
-Requires: php-composer(theseer/directoryscanner) < 2
-Requires: php-composer(theseer/directoryscanner) >= 1.3
-Requires: php-composer(zetacomponents/console-tools) < 2
-Requires: php-composer(zetacomponents/console-tools) >= 1.7
+Requires: php-theseer-directoryscanner >= 1.3
+Requires: php-zetacomponents-console-tools >= 1.7.1
%endif
# From phpcompatinfo report for version 1.25.0
Requires: php-cli
@@ -82,6 +85,8 @@ the option of creating static require lists as well as phar archives.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p0 -b .rpm
+%patch1 -p1
+%patch2 -p1
: drop composer dependencies
sed -e '\:../vendor/:d' -i src/autoload.php
@@ -119,14 +124,13 @@ php t.php --output foo.php src
cat <<EOF | tee tests/init.php
<?php
require '%{buildroot}%{_datadir}/php/TheSeer/Autoload/autoload.php';
-class_exists('PHPUnit\Framework\TestCase') or class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase');
EOF
ret=0
-for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72 php73 php74; do
+for cmd in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
if which $cmd; then
set $cmd
- $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1
fi
done
exit $ret
@@ -148,6 +152,11 @@ fi
%changelog
+* Tue Oct 27 2020 Remi Collet <remi@remirepo.net> - 1.25.9-3
+- add upstream patch for PHP 8
+- add patch for Xdebug 3 from
+ https://github.com/theseer/Autoload/pull/97
+
* Fri Mar 20 2020 Remi Collet <remi@remirepo.net> - 1.25.9-1
- update to 1.25.9