Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Cleanup deprecation notices #14258

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

Merged
merged 1 commit into from
Apr 8, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

This uses the same technique used for FlattenException in HttpKernel that prevents repeated notices triggered by the constructor.

@nicolas-grekas nicolas-grekas force-pushed the form-deprec-cleanup branch 2 times, most recently from eb4ccfa to 339ed89 Compare April 8, 2015 05:32
@webmozart
Copy link
Contributor

Thanks Nicolas!

@webmozart webmozart merged commit 3f58862 into symfony:2.7 Apr 8, 2015
webmozart added a commit that referenced this pull request Apr 8, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Cleanup deprecation notices

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This uses the same technique used for FlattenException in HttpKernel that prevents repeated notices triggered by the constructor.

Commits
-------

3f58862 [Form] Cleanup deprecation notices
@nicolas-grekas nicolas-grekas deleted the form-deprec-cleanup branch April 8, 2015 09:39
@stof
Copy link
Member

stof commented Apr 8, 2015

@nicolas-grekas this does not work in case the new ChoiceView was used before your usage of the old ChoiceView. you won't get any warning in this case as the class is already loaded

@nicolas-grekas
Copy link
Member Author

If you extend from the deprecated ChoiceView, DebugClassLoader will warn you.
If you instantiate directly the deprecated ChoiceView after having previously instanciated the new ChoiceView (or a child of it), you won't get the warning.
I think this is acceptable: we will warn users that currently only use the deprecated class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants