-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix deprecation ignore by link #31
Conversation
1234 | ||
); | ||
|
||
$this->assertEquals(1, Deprecation::getUniqueTriggeredDeprecationsCount()); |
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.
🤔 if the deprecation is ignored, why is it taken into account in the count?
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.
It's the same test as the ane above for ignore by package. I don't know the reason behind this.
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.
This test does not make sense to me, and in fact, the existing code makes no sense to me either.
deprecations/lib/Doctrine/Deprecations/Deprecation.php
Lines 55 to 59 in ebe09b4
/** @var array<string,bool> */ | |
private static $ignoredPackages = []; | |
/** @var array<string,int> */ | |
private static $ignoredLinks = []; |
Why is ignoredLinks
a hash of counters instead of a hash of booleans?
Closing because the PR is stalling. Feel free to open a new one if you want to resume the work. |
@derrabus There is nothing to work on, the PR is ready to be reviewed and merged |
All right, reopening then. It's just that you had not answered @greg0ire's question until a couple of minutes ago. But I must admit, I don't understand your change and the test confuses me even more. |
For me it's not really the test that I don't understand, it's the pre-existing code 😅 It feels like |
Well, yes, because the question is about pre-existing code and not the change :-) I've just fixed obvious bug, based on the |
All right. Can you produce a green test suite? |
Closing in favor of #43 |
Initial value in
ignoredLinks
must be set to 1, same as https://github.com/doctrine/deprecations/blob/master/lib/Doctrine/Deprecations/Deprecation.php#L143 Otherwise the error is not ignored.