Created
July 24, 2012 14:29
-
-
Save everzet/3170223 to your computer and use it in GitHub Desktop.
app/autoload.php for Behat 2.4+ & Symfony2.1+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\Common\Annotations\AnnotationRegistry; | |
if (!class_exists('Composer\\Autoload\\ClassLoader', false)) { | |
$loader = require __DIR__.'/../vendor/autoload.php'; | |
} else { | |
$loader = new Composer\Autoload\ClassLoader(); | |
$loader->register(); | |
} | |
// intl | |
if (!function_exists('intl_get_error_code')) { | |
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; | |
$loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); | |
} | |
AnnotationRegistry::registerLoader('class_exists'); | |
return $loader; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not needed anymore with the latest composer. The standard app/autoload.php should work fine