Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Replaced setDefaultOptions by the new configureOptions method #4786

wants to merge 1 commit into from

Conversation

peterrehm
Copy link
Contributor

Q A
Doc fix? yes
New docs? yes
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.

@wouterj
Copy link
Member

wouterj commented Jan 7, 2015

👍

fabpot added a commit to symfony/symfony that referenced this pull request Jan 18, 2015
…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()
fabpot added a commit to symfony/security-bundle that referenced this pull request Jan 18, 2015
…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()
fabpot added a commit to symfony/form that referenced this pull request Jan 18, 2015
…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
Copy link
Contributor Author

@wouterj Since symfony/symfony#12891 is merged, you can remove the on hold label or even just merge it :)

@wouterj
Copy link
Member

wouterj commented Jan 18, 2015

Great job @peterrehm !

fabpot added a commit to symfony/form that referenced this pull request Jan 20, 2015
…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
Copy link
Member

wouterj commented Jan 20, 2015

@peterrehm seems like this needs a rebase. And I assume this has to be merged into the 2.7 branch?

@peterrehm
Copy link
Contributor Author

I have rebased it based on 2.7. It must be merged into 2.7, you are right.

weaverryan added a commit that referenced this pull request Jan 21, 2015
…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
@weaverryan
Copy link
Member

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 versionadded entries - there weren't super obvious spots to add them, but I at least wanted someone to be able to search in the docs and find out that this new method is a rename of the old one. See sha: 885c378

Thanks!

@weaverryan weaverryan closed this Jan 21, 2015
@peterrehm
Copy link
Contributor Author

Perfect, thanks! :)

@peterrehm peterrehm deleted the configure-options branch January 23, 2015 19:36
weaverryan added a commit that referenced this pull request Jan 25, 2015
* 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
fabpot added a commit to symfony/symfony that referenced this pull request Feb 5, 2015
…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
fabpot added a commit to symfony/form that referenced this pull request Feb 5, 2015
…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
fabpot added a commit to symfony/options-resolver that referenced this pull request Feb 5, 2015
…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
javiereguiluz pushed a commit to javiereguiluz/symfony-docs that referenced this pull request Jun 22, 2015
fabpot added a commit to symfony/form that referenced this pull request Dec 1, 2015
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants