-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation looks wrong here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
262d60b
to
c3adce6
Compare
ping @symfony/deciders |
👍 |
Isnt this not psr2 compilant? |
@webmozart You must fix the tests first: currently, there are 2 deprecation notices that are not silenced, making the tests fail:
|
@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. |
c3adce6
to
cd41596
Compare
@fabpot Thanks for the heads up. This should be fixed now. ping @symfony/deciders |
cd41596
to
de460b9
Compare
👍 (rebase needed) |
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. |
ping @webmozart |
Closing in favor of #14406 |
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
This PR moves the deprecation notice triggers introduced in #14050 to file level, as suggested by @stof.