SIGN IN SIGN UP

[Routing][FrameworkBundle] Add RouterBundle

The routing services move to the Routing component, which now provides its own bundle and
the "router" configuration. The "framework.router" configuration becomes an alias of it.

symfony/routing is a hard requirement of FrameworkBundle, so the bundle is registered
unconditionally, as CacheBundle is. The router itself stays off until it is configured.

canBeEnabled() could not be reused as is. Its "auto_enable" attribute makes ArrayNode::merge()
force "enabled" on, and its normalization does the same for an empty array, so the empty
configuration an auto-registered bundle is loaded with would have switched the router on and
then failed for the resource it has no way to guess. The rest of what it does is kept, so any
non-empty configuration still enables the router implicitly, and "resource" is demanded by a
root validate() rather than isRequired() for the same reason.

Two reads could not follow the services. The enabled locales are a kernel-wide setting owned
by another bundle, so the "_locale" requirement they produce is now built by LocalizedRoutesPass
at compile time. The router commands stay in FrameworkBundle, which owns their classes, and
RemoveMissingRouterDependenciesPass drops them when no router service is registered.
N
Nicolas Grekas committed
5e8ec1506d2e963ec4cd605f41937a317fd22206
Parent: 73ee6d8