summaryrefslogtreecommitdiffstats
path: root/php-pdepend-PHP-Depend-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-22 10:09:57 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-22 10:09:57 +0100
commitd05e5bcdba05f533f930fec1b84365f1972b81db (patch)
tree834247ca0eaf0250184b1604b5a58e62eb4b626f /php-pdepend-PHP-Depend-autoload.php
parent14d46a5eb0ca7a1758d1a142c6bdd0d789064dfe (diff)
php-pdepend-PHP-Depend: 2.2.6
Diffstat (limited to 'php-pdepend-PHP-Depend-autoload.php')
-rw-r--r--php-pdepend-PHP-Depend-autoload.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/php-pdepend-PHP-Depend-autoload.php b/php-pdepend-PHP-Depend-autoload.php
index 77ae7b1..2064dfa 100644
--- a/php-pdepend-PHP-Depend-autoload.php
+++ b/php-pdepend-PHP-Depend-autoload.php
@@ -1,19 +1,9 @@
<?php
/* Autoloader for pdepend/pdepend and its dependencies */
-$vendorDir = '/usr/share/php';
-// Use Symfony autoloader
-if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
- require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php';
- }
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('PDepend\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required([
+ '/usr/share/php/Symfony/Component/autoload.php',
+]);
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
-
-/* PDepend */
-$fedoraClassLoader->addPrefix('PDepend\\', dirname(__DIR__));
-
-/* for symfony/dependency-injection, filesystem and config */
-$fedoraClassLoader->addPrefix('Symfony\\Component\\', $vendorDir);