You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/ContainerBuilder.php
+19-5Lines changed: 19 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -467,6 +467,8 @@ public function getCompiler()
467
467
*/
468
468
publicfunctionset($id, $service)
469
469
{
470
+
$id = (string) $id;
471
+
470
472
if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) {
471
473
// setting a synthetic service on a compiled container is alright
472
474
thrownewBadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id));
@@ -484,7 +486,7 @@ public function set($id, $service)
484
486
*/
485
487
publicfunctionremoveDefinition($id)
486
488
{
487
-
if (isset($this->definitions[$id])) {
489
+
if (isset($this->definitions[$id = (string) $id])) {
488
490
unset($this->definitions[$id]);
489
491
$this->removedIds[$id] = true;
490
492
}
@@ -499,6 +501,8 @@ public function removeDefinition($id)
0 commit comments