File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ services:
1212 class : PHPStan\Symfony\ServiceMapFactory
1313 factory : PHPStan\Symfony\XmlServiceMapFactory (%symfony.container_xml_path% )
1414 -
15- class : PHPStan\Symfony\ServiceMap ( @symfony.serviceMapFactory::create () )
15+ class : @symfony.serviceMapFactory::create ()
1616
1717 # ControllerTrait::get()/has() return type
1818 -
Original file line number Diff line number Diff line change @@ -24,22 +24,25 @@ public function testExtensionNeon(): void
2424
2525 $ class = $ loader ->load (function (Compiler $ compiler ): void {
2626 $ compiler ->addExtension ('rules ' , new RulesExtension ());
27+ $ compiler ->addConfig (['parameters ' => ['rootDir ' => __DIR__ ]]);
2728 $ compiler ->loadConfig (__DIR__ . '/config.neon ' );
2829 $ compiler ->loadConfig (__DIR__ . '/../../extension.neon ' );
2930 }, $ key );
3031 /** @var \Nette\DI\Container $container */
3132 $ container = new $ class ();
3233
3334 self ::assertSame ([
35+ 'rootDir ' => __DIR__ ,
3436 'symfony ' => [
35- 'container_xml_path ' => ' ' ,
37+ 'container_xml_path ' => __DIR__ . ' /container.xml ' ,
3638 'constant_hassers ' => true ,
3739 ],
3840 ], $ container ->getParameters ());
3941
4042 self ::assertCount (2 , $ container ->findByTag ('phpstan.rules.rule ' ));
4143 self ::assertCount (4 , $ container ->findByTag ('phpstan.broker.dynamicMethodReturnTypeExtension ' ));
4244 self ::assertCount (3 , $ container ->findByTag ('phpstan.typeSpecifier.methodTypeSpecifyingExtension ' ));
45+ self ::assertInstanceOf (ServiceMap::class, $ container ->getByType (ServiceMap::class));
4346 }
4447
4548}
Original file line number Diff line number Diff line change 11parameters :
22 symfony :
3- container_xml_path : ' '
3+ container_xml_path : %rootDir%/container.xml
44
55services :
66 - PhpParser\PrettyPrinter\Standard
You can’t perform that action at this time.
0 commit comments