Closed
Description
Q | A |
---|---|
Bug report? | yes |
BC Break report? | no |
Feature request? | no |
RFC? | no |
Symfony version | 3.3.0 |
Broken in | #22940 |
While upgrading from 3.3.0-RC1 to 3.3.0, I've encountered a BC break / bug in config loader.
I have a kernel more-or-less matching the one in the Flex recipes. Here's my Kernel::configureRoutes() method:
protected function configureRoutes(RouteCollectionBuilder $routes) : void
{
$confDir = $this->getProjectDir() . '/etc';
if (is_dir($confDir . '/routing')) {
$routes->import($confDir . '/routing/*' . self::CONFIG_EXTS, '/', 'glob');
}
if (is_dir($confDir . '/routing/' . $this->environment)) {
$routes->import($confDir . '/routing/' . $this->environment . '/**/*' . self::CONFIG_EXTS, '/', 'glob');
}
$routes->import($confDir . '/routing' . self::CONFIG_EXTS, '/', 'glob');
}
I do not have an etc/routing.yaml
file, I only have an etc/routing/controllers.yaml
. While it was perfectly fine in 3.3.0-RC1, the loader worked fine and loaded only existing files, it now throws an exception while trying to load an unresolved file mask:
Symfony\Component\Config\Exception\FileLoaderLoadException:
Cannot load resource "[...]/etc/routing.{php,yaml}"
This behavior doesn't really make much sense, unlike the behavior in 3.3.0-RC1 with optional files, it's now mandatory to have empty files...
42A8