You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$configureContainer = new \ReflectionMethod($this, 'configureContainer');
112
+
} catch (\ReflectionException$e) {
113
+
thrownew \LogicException(sprintf('%s uses %s, but does not implement the required method "protected function configureContainer(ContainerConfigurator $c): void".', get_debug_type($this), MicroKernelTrait::class), 0, $e);
114
+
}
115
+
116
+
if (($configuratorClass = $this->getParameterClassName($configureContainer, 0)) && !\is_a(ContainerConfigurator::class, $configuratorClass, true)) {
106
117
$this->configureContainer($container, $loader);
107
118
108
119
return;
109
-
} catch (\TypeError$e) {
110
-
$file = $e->getFile();
111
-
112
-
if (0 !== strpos($e->getMessage(), sprintf('Argument 1 passed to %s::configureContainer() must be an instance of %s,', static::class, ContainerConfigurator::class))) {
113
-
throw$e;
114
-
}
115
120
}
116
121
117
122
// the user has opted into using the ContainerConfigurator
$configureRoutes = new \ReflectionMethod($this, 'configureRoutes');
160
+
} catch (\ReflectionException$e) {
161
+
thrownew \LogicException(sprintf('%s uses %s, but does not implement the required method "protected function configureRoutes(RoutingConfigurator $routes): void".', get_debug_type($this), MicroKernelTrait::class), 0, $e);
162
+
}
153
163
154
-
foreach ($collectionas$route) {
155
-
$controller = $route->getDefault('_controller');
164
+
if (($configuratorClass = $this->getParameterClassName($configureRoutes, 0)) && !\is_a(RoutingConfigurator::class, $configuratorClass, true)) {
165
+
trigger_deprecation('symfony/framework-bundle', '5.1', 'Using type "%s" for argument 1 of method "%s:configureRoutes()" is deprecated, use "%s" instead.', RouteCollectionBuilder::class, self::class, RoutingConfigurator::class);
if (0 !== strpos($e->getMessage(), sprintf('Argument 1 passed to %s::configureRoutes() must be an instance of %s,', static::class, RouteCollectionBuilder::class))) {
trigger_deprecation('symfony/framework-bundle', '5.1', 'Using type "%s" for argument 1 of method "%s:configureRoutes()" is deprecated, use "%s" instead.', RouteCollectionBuilder::class, self::class, RoutingConfigurator::class);
$this->expectExceptionMessage('Symfony\Bundle\FrameworkBundle\Tests\Kernel\MinimalKernel@anonymous uses Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait, but does not implement the required method "protected function configureContainer(ContainerConfigurator $c): void".');
$this->expectExceptionMessage('Symfony\Bundle\FrameworkBundle\Tests\Kernel\MinimalKernel@anonymous uses Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait, but does not implement the required method "protected function configureRoutes(RoutingConfigurator $routes): void".');
0 commit comments