File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ services:
12
12
class : PHPStan\Symfony\ServiceMapFactory
13
13
factory : PHPStan\Symfony\XmlServiceMapFactory (%symfony.container_xml_path% )
14
14
-
15
- class : PHPStan\Symfony\ServiceMap ( @symfony.serviceMapFactory::create () )
15
+ class : @symfony.serviceMapFactory::create ()
16
16
17
17
# ControllerTrait::get()/has() return type
18
18
-
Original file line number Diff line number Diff line change @@ -24,22 +24,25 @@ public function testExtensionNeon(): void
24
24
25
25
$ class = $ loader ->load (function (Compiler $ compiler ): void {
26
26
$ compiler ->addExtension ('rules ' , new RulesExtension ());
27
+ $ compiler ->addConfig (['parameters ' => ['rootDir ' => __DIR__ ]]);
27
28
$ compiler ->loadConfig (__DIR__ . '/config.neon ' );
28
29
$ compiler ->loadConfig (__DIR__ . '/../../extension.neon ' );
29
30
}, $ key );
30
31
/** @var \Nette\DI\Container $container */
31
32
$ container = new $ class ();
32
33
33
34
self ::assertSame ([
35
+ 'rootDir ' => __DIR__ ,
34
36
'symfony ' => [
35
- 'container_xml_path ' => ' ' ,
37
+ 'container_xml_path ' => __DIR__ . ' /container.xml ' ,
36
38
'constant_hassers ' => true ,
37
39
],
38
40
], $ container ->getParameters ());
39
41
40
42
self ::assertCount (2 , $ container ->findByTag ('phpstan.rules.rule ' ));
41
43
self ::assertCount (4 , $ container ->findByTag ('phpstan.broker.dynamicMethodReturnTypeExtension ' ));
42
44
self ::assertCount (3 , $ container ->findByTag ('phpstan.typeSpecifier.methodTypeSpecifyingExtension ' ));
45
+ self ::assertInstanceOf (ServiceMap::class, $ container ->getByType (ServiceMap::class));
43
46
}
44
47
45
48
}
Original file line number Diff line number Diff line change 1
1
parameters :
2
2
symfony :
3
- container_xml_path : ' '
3
+ container_xml_path : %rootDir%/container.xml
4
4
5
5
services :
6
6
- PhpParser\PrettyPrinter\Standard
You can’t perform that action at this time.
0 commit comments