Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Config] Feature request: recursive directory loading #11045

Closed
@javiereguiluz

Description

@javiereguiluz

In some parts of Symfony is common to load files recursively for a given directory. For example, setting the Controller/ directory in the routing.yml will make Symfony look for recursively for any controller defined in that directory:

_routes:
    resource: "@AcmeDemoBundle/Controller/"
    type:     annotation

Considering that the framework configuration is truly flexible and you can split configuration into tens of small files, it could be useful to be able to do this:

# app/config/config.yml
imports:
    - { resource: 'bundles/'  }
    - { resource: 'services/' }

In this case, Symfony would look for any compatible file (XML, YAML, PHP, INI) located at those directories.

(This feature request originated from this conversation at the symfony-docs repository)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions