8000 [DI] Have a better DX for excluded resources · Issue #30865 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

[DI] Have a better DX for excluded resources #30865

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
lyrixx opened this issue Apr 4, 2019 · 4 comments
Closed

[DI] Have a better DX for excluded resources #30865

lyrixx opened this issue Apr 4, 2019 · 4 comments
Labels
DependencyInjection DX DX = Developer eXperience (anything that improves the experience of using Symfony)

Comments

@lyrixx
Copy link
Member
lyrixx commented Apr 4, 2019

Description

This configuration does not scale very well.

We end up creating smaller section by feature.

AppBundle\Feature\:
    resource: '../../../src/Feature/*'

But At some point, it becomes complicated to maintain and we finish with something like:

AppBundle\Feature\:
    resource: '../../../src/Feature/*'
    exclude: '../../../src/Feature/{Model,Foobar.php,Bar/Bar.php,James/James.php,James/Url.php,James/Link.php,James/Queue.php,James/Download.php}'

Instead, I could be nice to be able to use such syntax:

AppBundle\Feature\:
    resource: '../../../src/Feature/*'
    exclude:
        - '../../../src/Feature/Model/
        - '../../../src/Feature/Foobar.php
        - '../../../src/Feature/James/{James.php,Url.php,Link.php,Queue.php,Download.php}'

So to make it simple:
excludes should accept a string or an array of string.

WDYT ?

@nicolas-grekas
Copy link
Member

What about #27075?

@nicolas-grekas
Copy link
Member
8000

Looks like a doc issue/PR is missing ;)

@lyrixx
Copy link
Member Author
lyrixx commented Apr 4, 2019

Exactly what I needed. I missed this one :)
Thanks

@lyrixx lyrixx closed this as completed Apr 4, 2019
@lyrixx
Copy link
Member Author
lyrixx commented Apr 4, 2019

@nicolas-grekas In my case a blog post. I don't read the doc so much ... :)

@xabbuh xabbuh added DependencyInjection DX DX = Developer eXperience (anything that improves the experience of using Symfony) labels Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DependencyInjection DX DX = Developer eXperience (anything that improves the experience of using Symfony)
Projects
None yet
Development

No branches or pull requests

3 participants
0