Closed
Description
Symfony version(s) affected: all
Description
In my company there is perpentual problem with the understanding of ignoreExtraKeys(false)
. And yes, when you see it in code you automatically assume that it disables ignoring the extra keys. Yet it does not. The "false" refers to the fact that it does not remove those extra keys.
Possible Solution
Either deprecate the call and add unambiguous methods (e.g. setIgnoreExtraKeys(bool $shouldKeysBeIgnored): void
and setRemoveExtraKeys(bool $shouldExtraKeysBeRemoved): void
) or at least add a constant to use in place of true/false (EXTRA_KEYS_KEEP=true
and EXTRA_KEYS_REMOVE=false
).