Skip to content

Commit 0e27275

Browse files
committed
Improved compatibility with PHPStan 1.0
1 parent 1108c45 commit 0e27275

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

tests/Rules/Symfony/ContainerInterfaceUnknownServiceRuleTest.php

+7-13
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
use PHPStan\Rules\Rule;
77
use PHPStan\Symfony\XmlServiceMapFactory;
88
use PHPStan\Testing\RuleTestCase;
9-
use PHPStan\Type\Symfony\ServiceTypeSpecifyingExtension;
10-
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
119

1210
/**
1311
* @extends RuleTestCase<ContainerInterfaceUnknownServiceRule>
@@ -20,17 +18,6 @@ protected function getRule(): Rule
2018
return new ContainerInterfaceUnknownServiceRule((new XmlServiceMapFactory(__DIR__ . '/container.xml'))->create(), new Standard());
2119
}
2220

23-
/**
24-
* @return \PHPStan\Type\MethodTypeSpecifyingExtension[]
25-
*/
26-
protected function getMethodTypeSpecifyingExtensions(): array
27-
{
28-
return [
29-
new ServiceTypeSpecifyingExtension('Symfony\Bundle\FrameworkBundle\Controller\Controller', new Standard()),
30-
new ServiceTypeSpecifyingExtension(AbstractController::class, new Standard()),
31-
];
32-
}
33-
3421
public function testGetPrivateService(): void
3522
{
3623
if (!class_exists('Symfony\Bundle\FrameworkBundle\Controller\Controller')) {
@@ -82,4 +69,11 @@ public function testGetPrivateServiceInLegacyServiceSubscriber(): void
8269
);
8370
}
8471

72+
public static function getAdditionalConfigFiles(): array
73+
{
74+
return [
75+
__DIR__ . '/../../../extension.neon',
76+
];
77+
}
78+
8579
}

0 commit comments

Comments
 (0)