Skip to content

[Config] Feature request: recursive directory loading #11045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
javiereguiluz opened this issue Jun 3, 2014 · 4 comments
Closed

[Config] Feature request: recursive directory loading #11045

javiereguiluz opened this issue Jun 3, 2014 · 4 comments
Labels

Comments

@javiereguiluz
Copy link
Member

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)

@cordoval
Copy link
Contributor

cordoval commented Jun 3, 2014

so it is not supported 😊 you really made me believe this @javiereguiluz ! Thank you!

@lavoiesl
Copy link
Contributor

lavoiesl commented Jun 3, 2014

@javiereguiluz
Copy link
Member Author

Closing this issue because the lack of comments about it makes me think that there is no real interest in this feature.

@lavoiesl
Copy link
Contributor

Well, that is a shame, because I can’t imagine going back to managing config files the original way.

nicolas-grekas pushed a commit to nicolas-grekas/symfony that referenced this issue May 20, 2015
Issue symfony#11045

For now, the Routing DirectoryLoader requires the type `directory`
to be specified so it does not conflict with `AnnotationDirectoryLoader`.
However, this could be refactored.
nicolas-grekas pushed a commit to nicolas-grekas/symfony that referenced this issue Jun 2, 2015
Issue symfony#11045

For now, the Routing DirectoryLoader requires the type `directory`
to be specified so it does not conflict with `AnnotationDirectoryLoader`.
However, this could be refactored.
fabpot added a commit that referenced this issue Jun 5, 2015
…ectory loading (lavoiesl, nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] [Routing] [Config] Recursive directory loading

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13246, #11045, #11059
| License       | MIT
| Doc PR        | -

Commits
-------

60b1c5b Added CHANGELOG entries, cleanups
73f0ee2 [DI][Routing] recursive directory loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants