Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Added optionignore_errors: not_found for imported config files#31310
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
3d94650 to5ab59f2Compare
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hi, thanks for the PR, it looks like a good idea to me.
About the implementation, I made my review into a patch, seepulzarraider#1
ignore_not_found for imported config filesignore_not_found for imported config filesignore_not_found for imported config filesignore_not_found for imported config filesc7916cf to9c7fc7bCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
6632ba8 to8ecb133Compare8ecb133 toecc0e7eCompareignore_not_found for imported config filesignore_not_found for imported config filespulzarraider commentedJun 3, 2019
Thank you@nicolas-grekas, I've merged your MR and did some more small improvements. |
OskarStark commentedJun 3, 2019
@pulzarraider If I am correct, this must now go into I already did this for the corresponding Docs-PRsymfony/symfony-docs#11647 |
dee7d76 tocddf68cComparepulzarraider commentedSep 28, 2019
I think this feature is finished.@nicolas-grekas@stof@sstok please review it again. |
ignore_not_found for imported config filesignore_errors: not_found for imported config files18c039e to419a9b5Compare
nicolas-grekas left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've rebased the PR and changed the logic to make it local to the DI component only.
(fabbot failure is unrelated - patch to be applied globally starting from 3.4)
…mporting config files
419a9b5 toe0ee01cComparepulzarraider commentedNov 8, 2019
Thank you@nicolas-grekas for your changes. |
nicolas-grekas commentedNov 8, 2019
Thank you@pulzarraider. |
…_found` for imported config files (pulzarraider)This PR was merged into the 4.4 branch.Discussion----------[DependencyInjection] Added option `ignore_errors: not_found` for imported config files| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#11647If someone want to add optional config file. The only available choice was to add `ignore_errors: true` optione.g.```imports: - { resource: parameters.yml, ignore_errors: true }```But this will hide all errors in imported file. We ran in many situations that broke our Symfony applications because we had a typo in this imported files.This PR introduce new possible value `not_found` for `ignore_errors` option. It can be used for optional config files like the `ignore_errors: true`, but it will ignore only the file non-existence, not the possible syntax errors inside.Usage:```imports: - { resource: parameters.yml, ignore_errors: not_found}```Commits-------e0ee01c [DependencyInjection] Added option `ignore_errors: not_found` while importing config files
…_found` for imported config files (pulzarraider)This PR was merged into the 4.4 branch.Discussion----------[DependencyInjection] Added option `ignore_errors: not_found` for imported config files<!--If your pull request fixes a BUG, use the oldest maintained branch that containsthe bug (seehttps://symfony.com/roadmap for the list of maintained branches).If your pull request documents a NEW FEATURE, use the same Symfony branch wherethe feature was introduced (and `master` for features of unreleased versions).-->Related merge request:symfony/symfony#31310Commits-------0a6873d [Configuration] Add documentation about `ignore_errors: not_found` option.
Uh oh!
There was an error while loading.Please reload this page.
If someone want to add optional config file. The only available choice was to add
ignore_errors: trueoptione.g.
But this will hide all errors in imported file. We ran in many situations that broke our Symfony applications because we had a typo in this imported files.
This PR introduce new possible value
not_foundforignore_errorsoption. It can be used for optional config files like theignore_errors: true, but it will ignore only the file non-existence, not the possible syntax errors inside.Usage: