summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-02-03 10:17:50 +0100
committerRemi Collet <remi@php.net>2023-02-03 10:17:50 +0100
commit19bceb69709724890c928fce2bd7ed7c484d484b (patch)
treec60459fda9b986b038b56973dcec450ddad1ca85
parent51a0e0d2c39b85f0ccda27603b6d12f42558e3fa (diff)
fix autoloader
-rw-r--r--php-phpspec-prophecy.spec16
1 files changed, 12 insertions, 4 deletions
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec
index 8c8f1db..80181d0 100644
--- a/php-phpspec-prophecy.spec
+++ b/php-phpspec-prophecy.spec
@@ -15,7 +15,7 @@
Name: php-phpspec-prophecy
Version: 1.17.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Highly opinionated mocking framework for PHP
License: MIT
@@ -96,11 +96,16 @@ to be used inside any testing framework out there with minimal effort.
phpab --template fedora --output src/Prophecy/autoload.php src
cat << 'EOF' | tee -a src/Prophecy/autoload.php
-\Fedora\Autoloader\Dependencies::required([
- [
+if (PHP_VERSION_ID > 80100) {
+ $inst = [
'%{_datadir}/php/Doctrine/Instantiator2/autoload.php',
'%{_datadir}/php/Doctrine/Instantiator/autoload.php',
- ],
+ ];
+} else {
+ $inst = '%{_datadir}/php/Doctrine/Instantiator/autoload.php';
+}
+\Fedora\Autoloader\Dependencies::required([
+ $inst,
'%{_datadir}/php/phpDocumentor/Reflection/DocBlock5/autoload.php',
]);
if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec
@@ -173,6 +178,9 @@ exit $ret
%changelog
+* Fri Feb 3 2023 Remi Collet <remi@remirepo.net> - 1.17.0-2
+- fix autoloader
+
* Fri Feb 3 2023 Remi Collet <remi@remirepo.net> - 1.17.0-1
- update to 1.17.0
- allow doctrine/instantiator v2