diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-03-03 15:09:30 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-03-03 15:09:30 +0100 |
commit | d16ff0822887fcfc7a88633b94c1826b6b3e510e (patch) | |
tree | deb3e871be85aa17818aa491b185b3bedbd2c741 | |
parent | ad9df12ef4a5ad75f360201eca70dec7b4584ca9 (diff) |
php-phpspec-prophecy: fix autoloader
-rw-r--r-- | php-phpspec-prophecy-autoload.php | 10 | ||||
-rw-r--r-- | php-phpspec-prophecy.spec | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php index 12f47cb..da7df3b 100644 --- a/php-phpspec-prophecy-autoload.php +++ b/php-phpspec-prophecy-autoload.php @@ -9,6 +9,12 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; // Dependencies require_once 'Doctrine/Instantiator/autoload.php'; -require_once 'SebastianBergmann/Comparator/autoload.php'; -require_once 'SebastianBergmann/RecursionContext/autoload.php'; require_once 'phpDocumentor/Reflection/DocBlock/autoload.php'; + +if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec + require_once (stream_resolve_include_path('SebastianBergmann/Comparator2/autoload.php') ?: 'SebastianBergmann/Comparator/autoload.php'); +} +if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v3 from phpunit, v2 from phpspec (via exporter) + require_once (stream_resolve_include_path('SebastianBergmann/RecursionContext3/autoload.php') ?: 'SebastianBergmann/RecursionContext/autoload.php'); +} + diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 28434fa..e066429 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -20,7 +20,7 @@ Name: php-phpspec-prophecy Version: 1.7.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Highly opinionated mocking framework for PHP Group: Development/Libraries @@ -134,6 +134,9 @@ rm -rf %{buildroot} %changelog +* Fri Mar 3 2017 Remi Collet <remi@remirepo.net> - 1.7.0-2 +- fix autoloader for dep. with multiple versions + * Fri Mar 3 2017 Remi Collet <remi@remirepo.net> - 1.7.0-1 - Update to 1.7.0 |