E45B [OptionsResolver] Options not provided by user triggers deprecation · Issue #28848 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[OptionsResolver] Options not provided by user triggers deprecation #28848

@ro0NL

Description

@ro0NL

Description
Since 4.2 OptionsResolver can deprecate options, however the deprecation is triggered from offsetGet()

@trigger_error(strtr($deprecationMessage, array('%name%' => $option)), E_USER_DEPRECATED);

Im not sure about this, it causes the deprecation to trigger without even being provided by the user (i.e. when accessing the default value). Shouldnt it be moved to resolve() instead?

ref #27277 cc @yceruto