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
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
if (isset($this->aliases[$id])) {
$id = $this->aliases[$id];
}
// Re-use shared service instance if it exists.
if (isset($this->services[$id]) || array_key_exists($id, $this->services)) {
return $this->services[$id];
}
compare to
public function initialized($id)
{
$id = strtolower($id);
return isset($this->services[$id]) || array_key_exists($id, $this->services);
}
but the service is not at $id but at $this->aliases[$id]
The text was updated successfully, but these errors were encountered:
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#12570).
Discussion
----------
Fix initialized() with aliased services
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12569
| License | MIT
| Doc PR |
Commits
-------
a18b6d1 Fix initialized() with aliased services
compare to
but the service is not at
$id
but at$this->aliases[$id]
The text was updated successfully, but these errors were encountered: