summaryrefslogtreecommitdiffstats
path: root/php-justinrainbow-json-schema-autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-justinrainbow-json-schema-autoload.php')
-rw-r--r--php-justinrainbow-json-schema-autoload.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/php-justinrainbow-json-schema-autoload.php b/php-justinrainbow-json-schema-autoload.php
index 24540d8..b2dca24 100644
--- a/php-justinrainbow-json-schema-autoload.php
+++ b/php-justinrainbow-json-schema-autoload.php
@@ -3,17 +3,9 @@
* Autoloader for justinrainbow/json-schema and its dependencies
*/
-$vendorDir = '/usr/share/php';
-
-// Use Symfony PSR4 autoloader
-if (!isset($fedoraPsr4ClassLoader) || !($fedoraPsr4ClassLoader instanceof \Symfony\Component\ClassLoader\Psr4ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\Psr4ClassLoader', false)) {
- require_once '/usr/share/php/Symfony/Component/ClassLoader/Psr4ClassLoader.php';
- }
-
- $fedoraPsr4ClassLoader = new \Symfony\Component\ClassLoader\Psr4ClassLoader();
- $fedoraPsr4ClassLoader->register(true);
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
}
-$fedoraPsr4ClassLoader->addPrefix('JsonSchema\\', __DIR__);
+\Fedora\Autoloader\Autoload::addPsr4('JsonSchema\\', __DIR__);