diff options
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'); +} + |