Skip to content

[Routing] Using glob Pattern in routing configuration breaks #22160

@lunetics

Description

@lunetics
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version dev-master

Using the glob pattern in the routing component breaks the YamlFileLoader:

e.g. given following config with routing.yml files in the directory

domain:
    resource: '../src/Project/**/Infrastructure/Resources/Routing/routing.yml'
    prefix: /

results that https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Loader/YamlFileLoader.php#L148 receives an array of RouteCollection and not a single RouteCollection, which results in a fatal error:

  [Symfony\Component\Debug\Exception\FatalThrowableError]  
  Call to a member function addPrefix() on array         

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDXDX = Developer eXperience (anything that improves the experience of using Symfony)RoutingStatus: Needs Review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions