nette/nette — Issue #523: DI\Container: services is created twice
Author: HosipLan
Created: 2012-02-10 10:19:32+00:00
State: open

extension

class FooExtension extends Nette\Config\CompilerExtension
{
public function loadConfiguration()
{
$this->getContainerBuilder()->addDefinition($this->prefix('bar'))->setClass('stdClass');
}
}

test:

dump($a = $this->context->foo->bar);
dump($b = $this->context->foo_bar);
dump($a === $b); // FALSE, expected TRUE