You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The signature for setAllowedValues is different in OptionsResolver as well and there are probably a few other examples.
While OptionsResolverInterface is deprecated things like the Form component still use it. It would be great to know those new methods are available so changes could be made in in components that still depend on the interface now in preparation for its removal in 3.0. Adding methods to interfaces doesn't seem like a BC break, or, if it is, Symfony is already doing it.
The text was updated successfully, but these errors were encountered:
@chrisguitarguy Adding methods to an interface is in fact, a backwards incompatible break. If the interface changes and someone implemented the interface, php will start giving errors that methods are missing from the implementation or signatures do not match.
In 2.7 you can use configureOptions(OptionsResolver $resolver) without the interface. And we don't add the new method to the deprecated interface to avoid BC break.
Examples:
setDefined
setNormalizer
The signature for
setAllowedValues
is different inOptionsResolver
as well and there are probably a few other examples.While
OptionsResolverInterface
is deprecated things like the Form component still use it. It would be great to know those new methods are available so changes could be made in in components that still depend on the interface now in preparation for its removal in 3.0. Adding methods to interfaces doesn't seem like a BC break, or, if it is, Symfony is already doing it.The text was updated successfully, but these errors were encountered: