diff options
Diffstat (limited to 'php-phpspec-prophecy.spec')
-rw-r--r-- | php-phpspec-prophecy.spec | 16 |
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 |