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
changed extend to automatically re-assign the extended service and keep it as shared or 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.
Fugbix typo.
Added syntax highlighting.
feature #84 [2.0] Frozen container after first service access (igorw)

This PR was merged into the master branch.

Discussion
----------

[2.0] 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.

Commits
-------

c5426eb Frozen container after first service access
feature #88 [2.0] changed extend to automatically re-assign the extended service and keep it as shared or factory (fabpot)

This PR was merged into the master branch.

Discussion
----------

[2.0] changed extend to automatically re-assign the extended service and keep it as shared or factory

alternative to #87

Commits
-------

382678c changed extend to automatically re-assign the extended service and keep it as shared or factory
minor #89 Fugbix typo. (whatthejeff)

This PR was merged into the master branch.

Discussion
----------

Fugbix typo.

Commits
-------

95f020a Fugbix typo.
minor #90 Added syntax highlighting. (whatthejeff)

This PR was merged into the master branch.

Discussion
----------

Added syntax highlighting.

Commits
-------

0975d86 Added syntax highlighting.
added a CHANGELOG
Fugbix typo.
minor #91 Fugbix typo. (whatthejeff)

This PR was merged into the master branch.

Discussion
----------

Fugbix typo.

Commits
-------

7d6a1bf Fugbix typo.
added @deprecated tag to Pimple::share()
optimized performance ... a lot

get() calls are 6x faster
set() calls are 3x faster
feature #92 optimized performance ... a lot (fabpot)

This PR was merged into the master branch.

Discussion
----------

optimized performance ... a lot

performance improvement when dealing with shared services:

get() calls are 6x faster
set() calls are 3x faster

Commits
-------

c94869c optimized performance ... a lot
moved protected properties to private
moved values to private as people can mess things up by using it directly