-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Replaced setDefaultOptions by the new configureOptions method #4786
Conversation
👍 |
…igureOptions() (peterrehm) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Deprecated setDefaultOptions() in favor of configureOptions() | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | | Fixed tickets | #12782 | License | MIT | Doc PR | symfony/symfony-docs#4786 This tries to provide a compatible API with the depreciation of the OptionResolverInterface. I would like to have this in 2.6.2 but I think that might not be possible? To me I think we should always provide an API where you do not need to use deprecated classes. Also can you think of any way to trigger errors on the use of the deprecated setDefaultOptions() method? Since it is usually overwritten without calling the parent class this might be tricky. Maybe only in the resolver if we can check if actual options has been resolved in a call to setDefaultOptions. Commits ------- 3d43cae Deprecated setDefaultOptions() in favor of configureOptions()
…igureOptions() (peterrehm) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Deprecated setDefaultOptions() in favor of configureOptions() | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | | Fixed tickets | #12782 | License | MIT | Doc PR | symfony/symfony-docs#4786 This tries to provide a compatible API with the depreciation of the OptionResolverInterface. I would like to have this in 2.6.2 but I think that might not be possible? To me I think we should always provide an API where you do not need to use deprecated classes. Also can you think of any way to trigger errors on the use of the deprecated setDefaultOptions() method? Since it is usually overwritten without calling the parent class this might be tricky. Maybe only in the resolver if we can check if actual options has been resolved in a call to setDefaultOptions. Commits ------- 3d43cae Deprecated setDefaultOptions() in favor of configureOptions()
…igureOptions() (peterrehm) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Deprecated setDefaultOptions() in favor of configureOptions() | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | | Fixed tickets | #12782 | License | MIT | Doc PR | symfony/symfony-docs#4786 This tries to provide a compatible API with the depreciation of the OptionResolverInterface. I would like to have this in 2.6.2 but I think that might not be possible? To me I think we should always provide an API where you do not need to use deprecated classes. Also can you think of any way to trigger errors on the use of the deprecated setDefaultOptions() method? Since it is usually overwritten without calling the parent class this might be tricky. Maybe only in the resolver if we can check if actual options has been resolved in a call to setDefaultOptions. Commits ------- 3d43cae Deprecated setDefaultOptions() in favor of configureOptions()
@wouterj Since symfony/symfony#12891 is merged, you can remove the on hold label or even just merge it :) |
Great job @peterrehm ! |
…igureOptions() (peterrehm) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Deprecated setDefaultOptions() in favor of configureOptions() | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | | Fixed tickets | #12782 | License | MIT | Doc PR | symfony/symfony-docs#4786 This tries to provide a compatible API with the depreciation of the OptionResolverInterface. I would like to have this in 2.6.2 but I think that might not be possible? To me I think we should always provide an API where you do not need to use deprecated classes. Also can you think of any way to trigger errors on the use of the deprecated setDefaultOptions() method? Since it is usually overwritten without calling the parent class this might be tricky. Maybe only in the resolver if we can check if actual options has been resolved in a call to setDefaultOptions. Commits ------- 3d43cae Deprecated setDefaultOptions() in favor of configureOptions()
@peterrehm seems like this needs a rebase. And I assume this has to be merged into the 2.7 branch? |
I have rebased it based on 2.7. It must be merged into 2.7, you are right. |
…method (peterrehm) This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #4786). Discussion ---------- Replaced setDefaultOptions by the new configureOptions method | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes|no (PR symfony/symfony#12891) | Applies to | 2.7 | Fixed tickets | #4565 Pending on the merge of symfony/symfony#12891. With this PR all references to setDefaultOptions and the deprecated OptionResolverInterface are removed in 2.7. Commits ------- 728205f Replaced setDefaultOptions by the new configureOptions method
Ah, thanks Peter! I'm very happy about this - great docs PR, and I'm happy to have this in the code (and the new method name is such an improvement!). I did add 2 Thanks! |
Perfect, thanks! :) |
* 2.7: [#4805] Adding versionadded added documentation for the new absolute_url() and relative_path() Twig functions Remove 'acme' Update routing.rst [#4786] Adding a few versionadded's for the changed method name Replaced setDefaultOptions by the new configureOptions method Typo Update introduction.rst [Book][Translation] Added tip for routing params [varnish] be more precise about version differences Remove trailing whitespace [BestPractices] fix minor typo Remove horizontal scrollbar [Components][Debug] fix DebugClassLoader namespace Update override.rst Update override.rst [Book][Security] add back old anchors [Cookbook][Security] Hint about createToken can return null Add version added note for the debug:event-dispatcher command Conflicts: reference/twig_reference.rst
…ResolverInterface (peterrehm) This PR was merged into the 3.0-dev branch. Discussion ---------- [Form] Remove deprecated setDefaultOptions and OptionsResolverInterface | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#4786 | Related | #12891 Commits ------- 9b9158b Remove the deprecated OptionsResolverInterface 6026781 Removed deprecated setDefaultOptions methods
…ResolverInterface (peterrehm) This PR was merged into the 3.0-dev branch. Discussion ---------- [Form] Remove deprecated setDefaultOptions and OptionsResolverInterface | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#4786 | Related | #12891 Commits ------- 9b9158b Remove the deprecated OptionsResolverInterface 6026781 Removed deprecated setDefaultOptions methods
…ResolverInterface (peterrehm) This PR was merged into the 3.0-dev branch. Discussion ---------- [Form] Remove deprecated setDefaultOptions and OptionsResolverInterface | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#4786 | Related | #12891 Commits ------- 9b9158b Remove the deprecated OptionsResolverInterface 6026781 Removed deprecated setDefaultOptions methods
…ResolverInterface (peterrehm) This PR was merged into the 3.0-dev branch. Discussion ---------- [Form] Remove deprecated setDefaultOptions and OptionsResolverInterface | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#4786 | Related | #12891 Commits ------- 9b9158b Remove the deprecated OptionsResolverInterface 6026781 Removed deprecated setDefaultOptions methods
Pending on the merge of symfony/symfony#12891.
With this PR all references to setDefaultOptions and the deprecated OptionResolverInterface are removed in 2.7.