changed services to be shared by default
feature #83 [2.0] changed services to be shared by default (fabpot)

This PR was merged into the master branch.

Discussion
----------

[2.0] changed services to be shared by default

Now that we have several years of experience using Pimple, I think everyone agrees that having to call `share` everytime you need to define a service is cumbersome. And it is even error-prone when calling `extend` as one needs to call `share` again.

#62 proposes a shortcut for the extend use case, but I want to go one step further in Pimple 2.0: remove the need to call `share` altogether.

The reasoning is quite simple: services are 99.9% shared (I don't even have an example for a prototype service).

So, this PR makes closure shared by default. If you need to define a prototype service, call `prototype`.

This change is almost backward compatible as the `share` method is kept as a no-op method. The only BC break is if you have a prototype service in which case you need to wrap it with a `prototype` call.

Of course, Pimple 2.0 will be used in Silex 2.0, which will make things much easier to read and shorter.

TODO:

 - [x] update docs and website for 2.0

Commits
-------

e5309ac changed services to be shared by default
renamed prototype to factory
feature #86 [2.0] renamed prototype to factory (fabpot)

This PR was merged into the master branch.

Discussion
----------

[2.0] renamed prototype to factory

The only valid usage for the `prototype` type of services is factories. So, I'd like to rename prototype to factory in the code to make things easier to understand.

Commits
-------

6d6925b renamed prototype to factory
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.

This freezing happens on a per-service basis.

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.