This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bridge
Christophe Coevoet 03b91089e0 Use the method map as authoritative list of factories for dumped containers
The initial implementation of the method factory discovery was based on a
naming convention for factory methods. However, this naming convention allowed
to generate the same name for multiple ids. In the meantime, a method map was
introduced to solve this issue (and others).
When accessing a service with a different id than the official one (thanks to
ambiguities), this breaks the sharing of the service, as it creates a new
instance each time and replaces the existing shared instance. This was also
inconsistent between a dumped container (affected by this) and a non-dumped
container (reporting a service not found error for the other id).

The method map is now the authoritative way to discover available service
factories. When the dumped container was generated with a method map (which
is the case when using the dumper shipped in the component), the logic based
on defined methods is not executed anymore. This forbids using another id than
the real one to access the service (preventing to trigger the broken behavior).
When using a dumper which does not fill the method map, the old logic is still
applied, but deprecation warnings are triggered on access to dumped services.
2016-10-05 19:22:04 +02:00
..
Doctrine Merge branch '3.1' 2016-09-28 18:19:22 -07:00
Monolog Merge branch '3.1' 2016-06-29 07:43:10 +02:00
PhpUnit [Bridge/PhpUnit] Handle native E_DEPRECATED 2016-09-24 10:11:35 +02:00
ProxyManager Use the method map as authoritative list of factories for dumped containers 2016-10-05 19:22:04 +02:00
Twig decoupled the Twig HttpKernelExtension runtime from the extension 2016-09-30 11:15:51 -07:00