Resolves issue with spl_autoload_register creating new copies of the container and passing that into the closure.
This commit is contained in:
parent
f6b4f89f8f
commit
6e75fd16c8
@ -42,9 +42,9 @@ class DoctrineBundle extends Bundle
|
||||
if ($this->container->hasParameter('doctrine.orm.proxy_namespace')) {
|
||||
$namespace = $this->container->getParameter('doctrine.orm.proxy_namespace');
|
||||
$dir = $this->container->getParameter('doctrine.orm.proxy_dir');
|
||||
$container = $this->container;
|
||||
$container =& $this->container;
|
||||
|
||||
spl_autoload_register(function($class) use ($namespace, $dir, $container) {
|
||||
spl_autoload_register(function($class) use ($namespace, $dir, &$container) {
|
||||
if (0 === strpos($class, $namespace)) {
|
||||
$className = substr($class, strlen($namespace) +1);
|
||||
$file = $dir.DIRECTORY_SEPARATOR.$className.'.php';
|
||||
|
Reference in New Issue
Block a user