Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Form] Moved deprecation notice triggers to file level #14201

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
wants to merge 2 commits into from

Conversation

webmozart
Copy link
Contributor

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

This PR moves the deprecation notice triggers introduced in #14050 to file level, as suggested by @stof.

@@ -11,6 +11,8 @@

namespace Symfony\Bridge\Doctrine\Form\ChoiceList;

trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks wrong here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

@webmozart webmozart force-pushed the issue4067-class-triggers branch from 262d60b to c3adce6 Compare April 3, 2015 16:03
@webmozart
Copy link
Contributor Author

ping @symfony/deciders

@xabbuh
Copy link
Member

xabbuh commented Apr 3, 2015

👍

@staabm
Copy link
Contributor

staabm commented Apr 3, 2015

Isnt this not psr2 compilant?

@fabpot
Copy link
Member

fabpot commented Apr 4, 2015

@webmozart You must fix the tests first: currently, there are 2 deprecation notices that are not silenced, making the tests fail:

Other deprecation notices (2)
The Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface interface is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ChoiceListInterface instead: 1x
The Symfony\Component\Form\Extension\Core\ChoiceList\LazyChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead: 1x

@stof
Copy link
Member

stof commented Apr 4, 2015

@staabm we are doing it in many places already. The advantage is that it triggers the deprecation only once even if you create 10 instances (avoiding to spam your logs) and it is triggered even if you overwrite the constructor without calling the parent one.

@webmozart
Copy link
Contributor Author

@fabpot Thanks for the heads up. This should be fixed now.

ping @symfony/deciders

@webmozart webmozart force-pushed the issue4067-class-triggers branch from cd41596 to de460b9 Compare April 8, 2015 09:09
@nicolas-grekas
Copy link
Member

👍 (rebase needed)

@cordoval
Copy link
Contributor

we also need another PR solving this too right?

DEPRECATED - The FormTypeExtensionInterface::setDefaultOptions()
 method is deprecated since version 2.7 and will be removed in 3.0. Use 
configureOptions() instead. This method will be added to the FormTypeExtensionInterface
 with Symfony 3.0.

@fabpot
Copy link
Member

fabpot commented Apr 14, 2015

ping @webmozart

@fabpot
Copy link
Member

fabpot commented Apr 19, 2015

Closing in favor of #14406

@fabpot fabpot closed this Apr 19, 2015
fabpot added a commit that referenced this pull request Apr 19, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

Issue4067 class triggers

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

This is #14201 rebased on latest 2.7.

This PR moves the deprecation notice triggers introduced in #14050 to file level, as [suggested](#14050 (comment)) by @stof.

Commits
-------

a3917fc [Form] Removed remaining deprecation notices in the test suite
8f297c1 [Form] Moved deprecation notice triggers to file level
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.

7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.