Closed
Description
I'm proposing to deprecate the RouteCollectionBuilder added in #15778 for several reasons:
- it does not support any of the newer features of all the other loaders like i18n routes ([Routing] Implement i18n routing #26143) or imports without trailing slash ([Routing] allow no-slash root on imported routes #26284)
- it's not documented anywhere in the symfony docs
- it seems obsolete since introducing RoutingConfigurator ([Routing] Add PHP fluent DSL for configuring routes #24180) which covers the same use-cases
- It's only used by the MicroKernelTrait forcing people two learn another API but at the end developers don't care much because they likely only import routes from files with a glob pattern as provided by flex/reciepes
To solve 4) we can deprecate the Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait::configureRoutes
and provide a different method that accepts a RoutingConfigurator
instead.