Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6b4d9f1

Browse files
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‎

Lines changed: 2 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /