@@ -413,7 +413,7 @@ public function setAlias($alias, $target)
413
413
$ this ->mapAliasToTarget ($ alias , $ target );
414
414
return ;
415
415
}
416
- throw new ContainerModificationsNotAllowedException ($ alias );
416
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ alias );
417
417
}
418
418
419
419
/**
@@ -429,7 +429,7 @@ public function setInvokableClass($name, $class = null)
429
429
$ this ->createAliasesAndFactoriesForInvokables ([$ name => $ class ?? $ name ]);
430
430
return ;
431
431
}
432
- throw new ContainerModificationsNotAllowedException ($ name );
432
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ name );
433
433
}
434
434
435
435
/**
@@ -445,7 +445,7 @@ public function setFactory($name, $factory)
445
445
$ this ->factories [$ name ] = $ factory ;
446
446
return ;
447
447
}
448
- throw new ContainerModificationsNotAllowedException ($ name );
448
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ name );
449
449
}
450
450
451
451
/**
@@ -504,7 +504,7 @@ public function setService($name, $service)
504
504
$ this ->services [$ name ] = $ service ;
505
505
return ;
506
506
}
507
- throw new ContainerModificationsNotAllowedException ($ name );
507
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ name );
508
508
}
509
509
510
510
/**
@@ -519,7 +519,7 @@ public function setShared($name, $flag)
519
519
$ this ->shared [$ name ] = (bool ) $ flag ;
520
520
return ;
521
521
}
522
- throw new ContainerModificationsNotAllowedException ($ name );
522
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ name );
523
523
}
524
524
525
525
/**
@@ -798,7 +798,7 @@ private function validateServiceNames(array $config)
798
798
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
799
799
continue ;
800
800
}
801
- throw new ContainerModificationsNotAllowedException ($ service );
801
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
802
802
}
803
803
}
804
804
@@ -807,7 +807,7 @@ private function validateServiceNames(array $config)
807
807
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
808
808
continue ;
809
809
}
810
- throw new ContainerModificationsNotAllowedException ($ service );
810
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
811
811
}
812
812
}
813
813
@@ -816,7 +816,7 @@ private function validateServiceNames(array $config)
816
816
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
817
817
continue ;
818
818
}
819
- throw new ContainerModificationsNotAllowedException ($ service );
819
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
820
820
}
821
821
}
822
822
@@ -825,7 +825,7 @@ private function validateServiceNames(array $config)
825
825
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
826
826
continue ;
827
827
}
828
- throw new ContainerModificationsNotAllowedException ($ service );
828
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
829
829
}
830
830
}
831
831
@@ -834,7 +834,7 @@ private function validateServiceNames(array $config)
834
834
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
835
835
continue ;
836
836
}
837
- throw new ContainerModificationsNotAllowedException ($ service );
837
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
838
838
}
839
839
}
840
840
@@ -843,7 +843,7 @@ private function validateServiceNames(array $config)
843
843
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
844
844
continue ;
845
845
}
846
- throw new ContainerModificationsNotAllowedException ($ service );
846
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
847
847
}
848
848
}
849
849
@@ -852,7 +852,7 @@ private function validateServiceNames(array $config)
852
852
if (! isset ($ this ->services [$ service ]) || $ this ->allowOverride ) {
853
853
continue ;
854
854
}
855
- throw new ContainerModificationsNotAllowedException ($ service );
855
+ throw ContainerModificationsNotAllowedException:: fromExistingService ($ service );
856
856
}
857
857
}
858
858
}
0 commit comments