From 33c50b2efac7dfaa85a7fe1123cdee870ffc9e64 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 22 Nov 2016 08:03:41 +0100 Subject: php-phpspec: fedora/autoloader --- phpspec-autoload.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'phpspec-autoload.php') diff --git a/phpspec-autoload.php b/phpspec-autoload.php index e050872..4ab6dde 100644 --- a/phpspec-autoload.php +++ b/phpspec-autoload.php @@ -1,26 +1,15 @@ register(); -} - -$fedoraClassLoader->addPrefixes(array( - 'Symfony\\Component\\' => $vendorDir, - 'PhpSpec\\' => dirname(__DIR__), -)); +\Fedora\Autoloader\Autoload::addPsr4('PhpSpec\\', __DIR__); +$vendorDir = stream_resolve_include_path('Symfony/Component/Console/Application.php'); +\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', dirname(dirname($vendorDir))); /* spec tree in current dir, when exists */ if (is_dir(getcwd().'/spec')) { - $fedoraClassLoader->addPrefix('spec', getcwd()); + \Fedora\Autoloader\Autoload::addPsr4('spec\\', getcwd().'/spec'); } // Dependencies (Rely on include_path as in PHPUnit dependencies + circular dependencies) -- cgit