Skip to content

Commit 6b4d9f1

Browse files
committed
Fixed forward compatibility with PHPStan 0.11.3
1 parent 1ef2927 commit 6b4d9f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Rules/Symfony/ContainerInterfaceUnknownServiceRule.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public function processNode(Node $node, Scope $scope): array
6262
$serviceId = ServiceMap::getServiceIdFromNode($node->args[0]->value, $scope);
6363
if ($serviceId !== null) {
6464
$service = $this->serviceMap->getService($serviceId);
65-
if ($service === null && !$scope->isSpecified(Helper::createMarkerNode($node->var, $scope->getType($node->args[0]->value), $this->printer))) {
65+
$serviceIdType = $scope->getType($node->args[0]->value);
66+
if ($service === null && !$scope->getType(Helper::createMarkerNode($node->var, $serviceIdType, $this->printer))->equals($serviceIdType)) {
6667
return [sprintf('Service "%s" is not registered in the container.', $serviceId)];
6768
}
6869
}

0 commit comments

Comments
 (0)