[TwigBridge] fixed bootstrap
This commit is contained in:
parent
dee79e910d
commit
140ac2014e
@ -16,7 +16,8 @@ Components, declare the following environment variables before running
|
||||
PHPUnit:
|
||||
|
||||
export TWIG=../path/to/Twig
|
||||
export SYMFONY_FORM=../path/to/Form
|
||||
export SYMFONY_TRANSLATION=../path/to/Translation
|
||||
export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher
|
||||
export SYMFONY_FORM=../path/to/Form
|
||||
export SYMFONY_LOCALE=../path/to/Locale
|
||||
export SYMFONY_TEMPLATING=../path/to/Templating
|
||||
export SYMFONY_TRANSLATION=../path/to/Translation
|
||||
|
@ -11,10 +11,11 @@
|
||||
|
||||
spl_autoload_register(function ($class) {
|
||||
foreach (array(
|
||||
'SYMFONY_FORM' => 'Form',
|
||||
'SYMFONY_TRANSLATION' => 'Translation',
|
||||
'SYMFONY_LOCALE' => 'Locale',
|
||||
'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher',
|
||||
'SYMFONY_FORM' => 'Form',
|
||||
'SYMFONY_LOCALE' => 'Locale',
|
||||
'SYMFONY_TEMPLATING' => 'Templating',
|
||||
'SYMFONY_TRANSLATION' => 'Translation',
|
||||
) as $env => $name) {
|
||||
if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) {
|
||||
if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) {
|
||||
|
Reference in New Issue
Block a user