-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.7] adds deprecation notices. #13060
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
hhamon
commented
Dec 21, 2014
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | #12608, #12672, #12675 #12684, #12686 |
License | MIT |
Doc PR | ~ |
ce0930c
to
1359afb
Compare
1359afb
to
940da08
Compare
$constraint->type = 'isbn13'; | ||
if (null == $this->type) { | ||
if ($this->isbn10 && !$this->isbn13) { | ||
trigger_error('The "isbn10" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option 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.
IMO this should go into the Isbn
class.
Rebase needed. (e.g. Symfony\Component\Debug\ErrorHandler::TYPE_DEPRECATION) |
ef08363
to
2e35356
Compare
This PR has been rebased. Let's see what Travis says now. |
9f65033
to
baa9163
Compare
Tests are green from |
It seems failing tests are due to PHPUnit. |
5320819
to
d6f28ae
Compare
Yeah test suite is finally green! Thanks @nicolas-grekas. Ping @fabpot |
0d623e4
to
616de96
Compare
Even though tests are passing, this PR is still a WIP as some deprecation messages still need to be normalized. |
* The {@link Symfony\Component\Form\Util\InheritDataAwareIterator::__construct} method | ||
* forces this argument to false. | ||
*/ | ||
if ($triggerDeprecationNotice) { |
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.
instead of adding an extra argument, it would be more reliable to use get_class($this) === __CLASS__
given that our use case for avoiding the trigger is for the child class.
2806171
to
cd96ff9
Compare
@@ -20,7 +20,7 @@ | |||
* | |||
* @author Fabien Potencier <fabien@symfony.com> | |||
* | |||
* @deprecated Deprecated in 2.2, to be removed in 3.0. | |||
* @deprecated since version 2.2, to be removed in 3.0. |
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.
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.
Looks like it is as per b957f44. The strange thing is the introduced deprecation notice in the construct method saying passing a ContainerInterface
instance is deprecated since version 2.7 and will be removed in 3.0. The whole class is already deprecated and will be removed in 3.0, which is confusing.
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.
The whole class was deprecated in 2.2. I changed the constructor argument in 2.7. But anyway, nobody should use this class and it will be removed in 3.0. See #13233
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.
Ok thanks.
…revent breaking third party projects implementing them.
…FormAwareIterator class.
cd96ff9
to
f9fbb4f
Compare
I tested this PR locally after rebasing it on latest 2.7, tests are green.
👍 from me. There are places where we'll need to remove/update some deprecation triggers and adding all of them like done here will allow us to see where. I'll enhance the deprecation summary once this gets merged so we can start by the most complaining triggers. |
Thank you @hhamon. |
This PR was merged into the 2.7 branch. Discussion ---------- [2.7] adds deprecation notices. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #12608, #12672, #12675 #12684, #12686 | License | MIT | Doc PR | ~ Commits ------- f9fbb4f Fixes more deprecation notices as per @stof review. fd47c07 Fixed some deprecations according to @stof feedbacks. 2a3e7d2 Normalizes deprecation notice messages. 738b9be [Validator] fixes UuidValidator deprecated class namespace. e608ba6 [Form] adds more deprecation notices. cd9617a [Validator] adds more deprecation notices. a7f841e [Form] Adds a way to trigger deprecation notice on demand for VirtualFormAwareIterator class. 97efd2c Fixes more deprecation notices. fd9c7bb Normalized @deprecated annotations. 39cfd47 Removed deprecation notices from test files. 2a9749d Fixes deprecation notices. 6f57b7b Reverted trigger_error() function calls on deprecated interfaces to prevent breaking third party projects implementing them. 86b9f6b Adds deprecation notices for structures to be removed in 3.0.
Great to see that work merged. Let's see now how to handle all deprecations. |