Skip to content
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

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

Closed
lyrixx opened this Issue Apr 4, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Apr 4, 2019

What about #27075?

@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Apr 4, 2019

Looks like a doc issue/PR is missing ;)

@lyrixx

This comment has been minimized.

Copy link
Member Author

lyrixx commented Apr 4, 2019

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

@lyrixx lyrixx closed this Apr 4, 2019

@lyrixx

This comment has been minimized.

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 ... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.