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);
if ($configuratorClass && !is_a(ContainerConfigurator::class, $configuratorClass, true)) {
106
119
$this->configureContainer($container, $loader);
107
120
108
121
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
122
}
116
123
117
124
// the user has opted into using the ContainerConfigurator
$configureRoutes = new \ReflectionMethod($this, 'configureRoutes');
162
+
} catch (\ReflectionException$e) {
163
+
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);
if ($configuratorClass && !is_a(RoutingConfigurator::class, $configuratorClass, true)) {
169
+
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);
161
170
162
-
return$collection;
163
-
} catch (\TypeError$e) {
164
-
if (0 !== strpos($e->getMessage(), sprintf('Argument 1 passed to %s::configureRoutes() must be an instance of %s,', static::class, RouteCollectionBuilder::class))) {
165
-
throw$e;
166
-
}
171
+
$routes = newRouteCollectionBuilder($loader);
172
+
$this->configureRoutes($routes);
173
+
174
+
return$routes->build();
167
175
}
168
176
169
-
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