summaryrefslogtreecommitdiffstats
path: root/php-phpspec-prophecy-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-04-14 07:43:46 +0200
committerRemi Collet <remi@remirepo.net>2017-04-14 07:43:46 +0200
commit76ad42f108a9f963a28ed8768f1e9d05a0aef884 (patch)
treeb229239d7b4b43d2508cdb8c3e400e278a95e59e /php-phpspec-prophecy-autoload.php
parent43f65498795c738257a151fcc516ad38519fd052 (diff)
sync with Fedora
Diffstat (limited to 'php-phpspec-prophecy-autoload.php')
-rw-r--r--php-phpspec-prophecy-autoload.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php
index da7df3b..599ad20 100644
--- a/php-phpspec-prophecy-autoload.php
+++ b/php-phpspec-prophecy-autoload.php
@@ -9,7 +9,15 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
// Dependencies
require_once 'Doctrine/Instantiator/autoload.php';
-require_once 'phpDocumentor/Reflection/DocBlock/autoload.php';
+if ($dep = stream_resolve_include_path('phpDocumentor/Reflection/DocBlock/autoload.php')) {
+ require_once $dep;
+} else if ($dep = stream_resolve_include_path('phpDocumentor/Reflection/DocBlock2/autoload.php')) {
+ require_once $dep;
+} else {
+ trigger_error('phpDocumentor reflection docblock autoloader not found in include path', E_USER_ERROR);
+ exit(1);
+}
+unset($dep);
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');
@@ -17,4 +25,3 @@ if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from 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');
}
-