symfony/symfony — Issue #3213: [DependencyInjection] Service Circular Reference Memory Exhausted 
Author: Maks3w
Created: 2012-01-29 17:22:58+00:00
State: open

The Circular Reference algorithm fail when try to detect circular reference of services being aliasing.

The "problematic" line is

```` php
// src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php
public function load(array $configs, ContainerBuilder $container)
{
//...
$container->setAlias('acme_demo.alias', 'acme_demo.service');
//...
}
````

show this error:

````
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in /***/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php on line 58
````

when expects this other exception:

```
[Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException]
Circular reference detected for service "acme_demo.service", path: "acme_demo.service -> acme_demo.service".
```

Of course the severity of the issue is low. Breaking circular reference fix the problem.