diff --git a/src/Pimple/Container.php b/src/Pimple/Container.php index 23e851b..3bbd255 100644 --- a/src/Pimple/Container.php +++ b/src/Pimple/Container.php @@ -196,7 +196,7 @@ public function protect($callable) throw new ExpectedInvokableException('Callable is not a Closure or invokable object.'); } - $this->protected->attach($callable); + $this->protected->offsetSet($callable); return $callable; } @@ -268,8 +268,8 @@ public function extend($id, $callable) }; if (isset($this->factories[$factory])) { - $this->factories->detach($factory); - $this->factories->attach($extended); + $this->factories->offsetUnset($factory); + $this->factories->offsetSet($extended); } return $this[$id] = $extended;