summaryrefslogtreecommitdiffstats
path: root/php-jeremeamia-superclosure-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-12-07 13:53:40 +0100
committerRemi Collet <fedora@famillecollet.com>2016-12-07 13:53:40 +0100
commit190ffff4e85a93921c1c43db727bbbec2acb8dd3 (patch)
tree7a6dca4daf4e05768b0710fbdb80f0328b970c84 /php-jeremeamia-superclosure-autoload.php
parentec04a5e1dc8d765fff0d0e29726b60a21f80b2c1 (diff)
php-jeremeamia-superclosure: 2.3.0
Diffstat (limited to 'php-jeremeamia-superclosure-autoload.php')
-rw-r--r--php-jeremeamia-superclosure-autoload.php28
1 files changed, 9 insertions, 19 deletions
diff --git a/php-jeremeamia-superclosure-autoload.php b/php-jeremeamia-superclosure-autoload.php
index 13f5b27..b6d9496 100644
--- a/php-jeremeamia-superclosure-autoload.php
+++ b/php-jeremeamia-superclosure-autoload.php
@@ -1,23 +1,13 @@
<?php
/* Autoloader for jeremeamia/superclosure 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('SuperClosure\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required(array(
+ '/usr/share/php//Symfony/Polyfill/autoload.php',
+ array(
+ '/usr/share/php/PhpParser3/autoload.php',
+ '/usr/share/php/PhpParser2/autoload.php',
+ '/usr/share/php/PhpParser/autoload.php',
+)));
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
-
-$fedoraClassLoader->addPrefix('SuperClosure\\', dirname(__DIR__));
-
-// Dependencies
-if (file_exists($vendorDir . '/PhpParser2/autoload.php')) {
- require_once $vendorDir . '/PhpParser2/autoload.php';
-} else {
- require_once $vendorDir . '/PhpParser/autoload.php';
-}
-require_once $vendorDir . '/Symfony/Polyfill/autoload.php';