-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Config] Handle ignoreExtraKeys in config builder #40987
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
Conversation
|
Thank you. Could you elaborate on the use case for this? Could you give an example of a public bundle that is using this? |
Nyholm
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.
Thank you.
I did not know of this feature. Or at least it does not ring a bell right now.
I am happy with the implementation. Just some details. I would like to know a public bundle that is using this because it will be easy to test and review the generated output.
src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
Outdated
Show resolved
Hide resolved
|
Thank you for the update. Could you please answer me to this:
|
I've went through some popular bundles & none of them use it, so it I'd say it not a feature often used. I've used it only once when I wanted to allow custom options to be passed to a service. |
Nyholm
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.
Thank you.
I only have one thing that I would like to change.
|
@Nyholm It looks like SwiftMailerBundle does https://github.com/symfony/swiftmailer-bundle/blob/main/DependencyInjection/Configuration.php#L105 |
Nyholm
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.
Thank you.
Im happy with the implementation.
I've changed the target branch. I've also added a few comments about the actual method on the Config class.
src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
Outdated
Show resolved
Hide resolved
Nyholm
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.
Thank you
|
Im not sure why Travis didn't run... |
|
Thank you @HypeMC. |
Currently the config builder doesn't handle the
ignoreExtraKeysoption. This is an attempt to fix that.TODO