File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 33namespace mglaman \PHPStanDrupal \Drupal ;
44
55use Composer \Autoload \ClassLoader ;
6+ use Drupal \Component \DependencyInjection \Container as DrupalContainer ;
67use Drupal \Core \DependencyInjection \ContainerNotInitializedException ;
78use Drupal \Core \DrupalKernelInterface ;
89use Drupal \TestTools \PhpUnitCompatibility \PhpUnit8 \ClassWriter ;
1213use PHPUnit \Framework \Test ;
1314use ReflectionClass ;
1415use RuntimeException ;
16+ use Symfony \Component \DependencyInjection \ContainerInterface ;
1517use Symfony \Component \Finder \Finder ;
1618use Symfony \Component \Yaml \Yaml ;
1719use Throwable ;
@@ -108,7 +110,10 @@ public function register(Container $container): void
108110 // Attach synthetic services
109111 // @see \Drupal\Core\DrupalKernel::attachSynthetic
110112 $ this ->serviceMap ['kernel ' ] = ['class ' => DrupalKernelInterface::class];
113+ $ this ->serviceMap [DrupalKernelInterface::class] = ['alias ' => 'kernel ' ];
111114 $ this ->serviceMap ['class_loader ' ] = ['class ' => ClassLoader::class];
115+ $ this ->serviceMap ['service_container ' ] = ['class ' => DrupalContainer::class];
116+ $ this ->serviceMap [ContainerInterface::class] = ['alias ' => 'service_container ' ];
112117
113118 $ extensionDiscovery = new ExtensionDiscovery ($ this ->drupalRoot );
114119 $ extensionDiscovery ->setProfileDirectories ([]);
You can’t perform that action at this time.
0 commit comments