Skip to content

Commit 2fa8381

Browse files
committed
bug #24709 [HttpKernel] Move services reset to Kernel::handle()+boot() (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] Move services reset to Kernel::handle()+boot() | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24552 | License | MIT | Doc PR | - This is an alternative to #24697 (which uses middlewares). This PR adds a new `services_resetter` service that the Kernel calls on 2nd root requests to reset services. Instead of #24697 which plans for optional enabling of the services reset, this approach moves the responsibility of calling the services resetter to the core Kernel class, so that no configuration/middleware/etc. is required at all, and no overhead exists at all for regular requests. Commits ------- 4501a3688b [HttpKernel] Move services reset to Kernel
2 parents 53639a8 + a47dea0 commit 2fa8381

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Resources/config/services.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
<tag name="config_cache.resource_checker" priority="-990" />
7676
</service>
7777

78-
<service id="Symfony\Component\HttpKernel\EventListener\ServiceResetListener">
79-
<argument /> <!-- ResettableServicePass will inject an iterator of initialized services here ($serviceId => $serviceInstance) -->
80-
<argument type="collection" /> <!-- ResettableServicePass will inject an array of reset methods here ($serviceId => $method) -->
81-
<tag name="kernel.event_subscriber" />
82-
</service>
78+
<service id="services_resetter" class="Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter" public="true" />
8379
</services>
8480
</container>

0 commit comments

Comments
 (0)