From d16ff0822887fcfc7a88633b94c1826b6b3e510e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 3 Mar 2017 15:09:30 +0100 Subject: php-phpspec-prophecy: fix autoloader --- php-phpspec-prophecy-autoload.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'php-phpspec-prophecy-autoload.php') 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'); +} + -- cgit