-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Hi,
I have a problem/doubt about locked container, I don't understand the functioning of this issue.
I'm trying to set after call a get and an exception is thrown:
Fatal error: Uncaught exception 'Aura\Di\Exception\ContainerLocked' with message 'Cannot modify container when locked.'
I'm trying to do something like this:
$container = (new Aura\Di\ContainerBuilder)->newInstance();
$container->set('object1', new stdClass);
var_dump($container->isLocked());
$container->get('object1');
var_dump($container->isLocked());
$container->set('object3', new stdClass); // Exception thrown
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels