From 9e850c26ed992801f06b0726f53afaba55534387 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 21 Oct 2016 11:09:10 +0200 Subject: php-justinrainbow-json-schema; fedira-loader --- php-justinrainbow-json-schema-autoload.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'php-justinrainbow-json-schema-autoload.php') 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__); -- cgit