File tree 3 files changed +13
-0
lines changed
Bundle/FrameworkBundle/Resources/config
Component/DependencyInjection
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
195
195
tagged_iterator ('container.env_var_loader ' ),
196
196
])
197
197
->tag ('container.env_var_processor ' )
198
+ ->tag ('kernel.reset ' , ['method ' => 'reset ' ])
198
199
199
200
->set ('slugger ' , AsciiSlugger::class)
200
201
->args ([
Original file line number Diff line number Diff line change @@ -290,6 +290,14 @@ public function reset(): void
290
290
$ this ->envCache = $ this ->services = $ this ->factories = $ this ->privates = [];
291
291
}
292
292
293
+ /**
294
+ * @internal
295
+ */
296
+ public function resetEnvCache (): void
297
+ {
298
+ $ this ->envCache = [];
299
+ }
300
+
293
301
/**
294
302
* Gets all service ids.
295
303
*
Original file line number Diff line number Diff line change @@ -374,5 +374,9 @@ public function reset(): void
374
374
{
375
375
$ this ->loadedVars = [];
376
376
$ this ->loaders = $ this ->originalLoaders ;
377
+
378
+ if ($ this ->container instanceof Container) {
379
+ $ this ->container ->resetEnvCache ();
380
+ }
377
381
}
378
382
}
You can’t perform that action at this time.
0 commit comments