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
Hey!
I've tries to fix a few deprecations with MicroKernelTrait in my code after updating to Symfony 5.1 and tried to see how this was fixed in custom bundles.
Look here:
configureRouting(RoutingConfigurator $routes) will be implemented when configureRouting will exist, or configureRoutes(RouteCollectionBuilder $routes) when it does not exist.
Looks like this configureRouting was implemented here (probably in some of 5.1-dev), but then it was reverted here (when Symfony 5.1 was released).
So, configureRouting will never actually exist, and method configureRoutes(RouteCollectionBuilder $routes) will always be implemented.
But RouteCollectionBuilder was deprecated since 5.1 and we must use some sort of
Hey!
I've tries to fix a few deprecations with
MicroKernelTrait
in my code after updating to Symfony 5.1 and tried to see how this was fixed in custom bundles.Look here:
webpack-encore-bundle/tests/IntegrationTest.php
Lines 267 to 281 in 5c0f659
configureRouting(RoutingConfigurator $routes)
will be implemented whenconfigureRouting
will exist, orconfigureRoutes(RouteCollectionBuilder $routes)
when it does not exist.Looks like this
configureRouting
was implemented here (probably in some of 5.1-dev), but then it was reverted here (when Symfony 5.1 was released).So,
configureRouting
will never actually exist, and methodconfigureRoutes(RouteCollectionBuilder $routes)
will always be implemented.But
RouteCollectionBuilder
was deprecated since 5.1 and we must use some sort ofWe cannot simply omit the type declaration (
protected function configureRoutes($routes)
), as it is checked by the BC layer:https://github.com/symfony/symfony/blob/e5b5d9ea14ef8141c20b79bbeaae360f1afbdc55/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php#L168-L174
Do you have any ideas how to check this without using version comparison?
The text was updated successfully, but these errors were encountered: