summaryrefslogtreecommitdiffstats
path: root/php-jeremeamia-superclosure-autoload.php
diff options
context:
space:
mode:
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';