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 /php-phpspec-prophecy-autoload.php | |
parent | ad9df12ef4a5ad75f360201eca70dec7b4584ca9 (diff) |
php-phpspec-prophecy: fix autoloader
Diffstat (limited to 'php-phpspec-prophecy-autoload.php')
-rw-r--r-- | php-phpspec-prophecy-autoload.php | 10 |
1 files changed, 8 insertions, 2 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'); +} + |