mnapoli/PHP-DI — pull request #140 by mnapoli (2013-12-10 22:41:25+00:00)
Title: [WIP] Refactoring of the definition sources

The definition sources are, as of today, a source of frustration and limitations. They make #136 very difficult for v4.0.

This is a refactoring where, instead of a DefinitionManager having a CombinedSource in which sources are added in a precise order, the sources will be chained.

So:

- There will be a "chain" of sources. The first one to return a definitions stops in the chain, so the first one has the highest priority.
- `AnnotationDefinitionSource` will completely replace `ReflectionDefinitionSource` when annotations are enabled, this is too much trouble for no less lines of code else
- introduction of a `ClassDefinitionSource` so that there is no need to "merge" definitions anymore. Merging was only useful for classes, so there will be another source "chain" only for `ClassDefinitionSource`