8000 [Config] FileLoader tries to load non-existent file with a mask while it silently ignored the resource in 3.3.0-RC1 · Issue #22950 · symfony/symfony · GitHub 8000
[go: up one dir, main page]

Skip to content
[Config] FileLoader tries to load non-existent file with a mask while it silently ignored the resource in 3.3.0-RC1 #22950
Closed
@Majkl578

Description

@Majkl578
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0