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/Bundle/FrameworkBundle
Fabien Potencier 2450449605 feature #22175 [DI] add ServiceLocatorTagPass::register() to share service locators (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] add ServiceLocatorTagPass::register() to share service locators

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Right now, one service locator is created per controller / service subscriber. But since service locators are stateless, this is just wasting resources when several controllers have the exact same set of services managed by their locators (as would be the case when registering the new `AbstractController` as a service subscribers).

This PR fixes this issue, and a few related others found along the way.

Commits
-------

8ff764be82 [DI] add ServiceLocatorTagPass::register() to share service locators
2017-04-03 15:47:57 -07:00
..
CacheWarmer Merge branch '3.2' 2017-02-28 15:44:39 +01:00
Command Merge branch '3.2' 2017-03-26 08:50:20 -07:00
Console [DI] Add "by-id" autowiring: a side-effect free variant of it based on the class<>id convention 2017-03-24 15:54:23 +01:00
Controller [FrameworkBundle] Introduce AbstractController, replacing ControllerTrait 2017-03-25 18:18:01 +01:00
DataCollector [FrameworkBundle] Extends the RequestDataCollector 2016-03-30 19:02:53 +02:00
DependencyInjection [DI] add ServiceLocatorTagPass::register() to share service locators 2017-04-01 13:57:21 +02:00
EventListener Replace some container injections by service locators 2017-02-26 14:01:31 +01:00
HttpCache Silence invasive deprecation warnings, opt-in for warnings 2015-06-08 10:37:21 +01:00
Kernel added a micro kernel 2015-11-04 18:19:57 +01:00
Resources [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener 2017-03-30 14:49:17 +02:00
Routing implement ServiceSubscriberInterface where applicable 2017-03-22 20:26:10 +01:00
Templating [FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container 2017-03-14 22:27:21 +01:00
Test Merge branch '2.7' into 2.8 2017-02-18 18:06:33 +01:00
Tests feature #22175 [DI] add ServiceLocatorTagPass::register() to share service locators (nicolas-grekas) 2017-04-03 15:47:57 -07:00
Translation [FrameworkBundle] Make Translator works with any PSR-11 container 2017-03-22 16:47:35 +01:00
Validator [DependencyInjection] Use a service locator in AddConstraintValidatorsPass 2017-03-01 08:17:18 -08:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [FrameworkBundle] fix typo in changelog 2017-03-29 18:13:28 +02:00
Client.php [FrameworkBundle] Fix autoloader in insulated clients 2017-03-08 10:00:17 +01:00
composer.json Merge branch '3.2' 2017-03-20 11:06:58 +01:00
FrameworkBundle.php feature #21771 [FrameworkBundle] Add new "controller.service_arguments" tag to inject services into actions (nicolas-grekas) 2017-03-22 15:24:31 -07:00
LICENSE updated LICENSE year 2017-01-02 12:30:00 -08:00
phpunit.xml.dist [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter 2017-01-02 17:22:30 +01:00
README.md add readme files where missing 2016-03-07 11:36:15 +01:00