Skip to content

Commit ad6d968

Browse files
committed
[DI] Cleanup unused service_subscriber.locator tag
1 parent 999b95f commit ad6d968

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Compiler/ResolveServiceSubscribersPass.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ protected function processValue($value, $isRoot = false)
3535
}
3636

3737
$serviceLocator = $this->serviceLocator;
38-
$this->serviceLocator = $value->hasTag('container.service_subscriber.locator') ? $value->getTag('container.service_subscriber.locator')[0]['id'] : null;
38+
$this->serviceLocator = null;
39+
40+
if ($value->hasTag('container.service_subscriber.locator')) {
41+
$this->serviceLocator = $value->getTag('container.service_subscriber.locator')[0]['id'];
42+
$value->clearTag('container.service_subscriber.locator');
43+
}
3944

4045
try {
4146
return parent::processValue($value);

0 commit comments

Comments
 (0)