mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
fixed the autoloader to take into account namespaced classes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
* 1.38.3 (2019-XX-XX)
|
||||
|
||||
* n/a
|
||||
* fixed the bundled Autoloader to also load namespaced classes
|
||||
|
||||
* 1.38.2 (2019-03-12)
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ class Twig_Autoloader
|
||||
|
||||
if (is_file($file = __DIR__.'/../'.str_replace(['_', "\0"], ['/', ''], $class).'.php')) {
|
||||
require $file;
|
||||
} elseif (is_file($file = __DIR__.'/../../src/'.str_replace(['Twig\\', '\\', "\0"], ['', '/', ''], $class).'.php')) {
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user