8000 OptionsResolverInterface Should Include the new OptionsResolver Methods · Issue #12830 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

OptionsResolverInterface Should Include the new OptionsResolver Methods #12830

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

Closed
chrisguitarguy opened this issue Dec 3, 2014 · 3 comments
Closed

Comments

@chrisguitarguy
Copy link
Contributor

Examples:

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.

@linaori
Copy link
Contributor
linaori commented Dec 3, 2014

@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.

@peterrehm
Copy link
Contributor

Related to #12782

@Tobion
Copy link
Contributor
Tobion commented Mar 4, 2015

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.

@Tobion Tobion closed this as completed Mar 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0