fabpot/Pimple — pull request #84 by igorw (2013-11-10 19:09:19+00:00)
Title: Frozen container after first service access

A big issue with pimple is that you can instantiate services and then re-
define the factories that produced dependencies of those services, leading
to inconsistent results.

An example:

* foo depends on baz
* bar depends on baz

foo and baz are defined, foo is accessed. baz is re-defined, bar is defined.
Although both foo and bar depend on baz, they got a different version of it.

A way to fix this problem is to freeze the container when the first service
is accessed. After the freeze you can still define new services and
parameters, but you cannot override existing ones.

In case you really must re-define a service, you can explicitly unset it,
but that is bad practice and should be avoided.

This is a BC break, as such it targets pimple 2.0.