-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[DependencyInjection] Show error when a null value is provided in the exclude list #46835
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
[DependencyInjection] Show error when a null value is provided in the exclude list #46835
Conversation
src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services_prototype.yml
Outdated
Show resolved
Hide resolved
486cc99 to
ff45787
Compare
3d8b562 to
160eb73
Compare
|
I would rather fail with a good error message explaining you your mistake rather than silently ignoring the invalid pattern. |
160eb73 to
63cfe5c
Compare
|
@stof Right, I force-pushed a check that will throw an error instead of ignoring it. If it's ok for you, tests will have to be updated to handle this case in a new test. |
63cfe5c to
0b2f7ad
Compare
src/Symfony/Component/DependencyInjection/Loader/FileLoader.php
Outdated
Show resolved
Hide resolved
|
I think this should be rebased on 6.2. |
|
What if using an empty item in another part of the config throw another error in another part of Symfony? Should the config validator be more strict? As I wrote in #46833, the YAML (or XML, etc.) is still valid. |
|
the Yaml being valid for the Yaml parser does not mean that the content of this Yaml is a valid input for the DependencyInjection file loader. That's why it is the FileLoader doing its validation on the input it expects. |
|
Tests fail, see failures + fabbot report also. It'd be better to create dedicated test cases to me. Can you please update the PR to do so? |
9182174 to
fc6a0d0
Compare
dec430e to
6bd7f57
Compare
|
The branch has been rebased and tests have been added. |
d62918f to
e034be0
Compare
|
Thank you @alexislefebvre. |
Avoid an exception when null values are provided in the
$excludePatternsarray.