summaryrefslogtreecommitdiffstats
path: root/autoload.php.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-04 17:26:47 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-04 17:26:47 +0200
commita3538a72491e17c29339919b67ff9e210208e05b (patch)
tree894db86197ad3335c15d857910fead53f175152b /autoload.php.in
parentd264b6c7f4d67819a7c2db0e485154361a9bf4b6 (diff)
php-phpunit-phploc: 2.1.3
Diffstat (limited to 'autoload.php.in')
-rw-r--r--autoload.php.in18
1 files changed, 14 insertions, 4 deletions
diff --git a/autoload.php.in b/autoload.php.in
index 52a3f0c..22ad17d 100644
--- a/autoload.php.in
+++ b/autoload.php.in
@@ -1,10 +1,20 @@
<?php
/* Inspired from autoload from version 2.0.3 */
-require_once 'SebastianBergmann/FinderFacade/autoload.php';
-require_once 'SebastianBergmann/Git/autoload.php';
-require_once 'SebastianBergmann/Version/autoload.php';
-require_once 'Symfony/Component/Console/autoloader.php';
+$vendorDir = '/usr/share/php';
+require_once $vendorDir . '/SebastianBergmann/FinderFacade/autoload.php';
+require_once $vendorDir . '/SebastianBergmann/Git/autoload.php';
+require_once $vendorDir . '/SebastianBergmann/Version/autoload.php';
+
+if (!(isset($sfuloader) && $sfuloader instanceof Symfony\Component\ClassLoader\UniversalClassLoader)) {
+ require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
+ $sfuloader = new Symfony\Component\ClassLoader\UniversalClassLoader();
+ $sfuloader->register();
+}
+$sfuloader->registerNamespaces(array(
+ 'Symfony\\Component\\Console' => $vendorDir,
+ 'Symfony\\Component\\ClassLoader' => $vendorDir,
+));
spl_autoload_register(
function($class) {