Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed id case when setting a service (also slightly enhanced an error…

… message)
  • Loading branch information...
commit e15974d43c7090b23024ff602b9001481351e469 1 parent ecd0974
@fabpot fabpot authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 ContainerBuilder.php
View
6 ContainerBuilder.php
@@ -347,15 +347,15 @@ public function getScopeChildren()
*/
public function set($id, $service, $scope = self::SCOPE_CONTAINER)
{
+ $id = strtolower($id);
+
if ($this->isFrozen()) {
// setting a synthetic service on a frozen container is alright
if (!isset($this->definitions[$id]) || !$this->definitions[$id]->isSynthetic()) {
- throw new BadMethodCallException('Setting service on a frozen container is not allowed');
+ throw new BadMethodCallException(sprintf('Setting service "%s" on a frozen container is not allowed.', $id));
}
}
- $id = strtolower($id);
-
unset($this->definitions[$id], $this->aliases[$id]);
parent::set($id, $service, $scope);
Please sign in to comment.
Something went wrong with that request. Please try again.