-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Always show all deprecations except legacy ones when not weak #25997
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
Always show all deprecations except legacy ones when not weak #25997
Conversation
c16a35a
to
abc2e37
Compare
abc2e37
to
e5928c2
Compare
@@ -165,13 +165,13 @@ public static function register($mode = 0) | |||
|
|||
exit(1); | |||
} | |||
if ('legacy' !== $group && !$isWeak) { |
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 $isWeak variable is not used anymore, isn't it ?
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.
That's right, good riddance!
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.
but now $isVendor is always false and $inVendors is never called :)
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.
I spotted and pushed again yeah :P should have checked the tests before pushing 😅
993980b
to
4af68d9
Compare
@@ -111,7 +111,7 @@ public static function register($mode = 0) | |||
$trace = debug_backtrace(true); | |||
$group = 'other'; | |||
$isVendor = false; | |||
$isWeak = DeprecationErrorHandler::MODE_WEAK === $mode || (DeprecationErrorHandler::MODE_WEAK_VENDORS === $mode && $isVendor = $inVendors($file)); | |||
$isVendor = $inVendors($file); |
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.
$isVendor = DeprecationErrorHandler::MODE_WEAK_VENDORS === $mode && ...
(same below, so that we don't compute $isVendor when not needed, isn't it?)
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.
Yeah plus I have 2 $isVendor
assignments now 😅
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 condition on line 147 can go
4af68d9
to
d7b0236
Compare
----- | ||
|
||
* all deprecations but those from tests marked with `@group legacy` are always | ||
displayed, regardless of the mode. |
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.
needs an update :)
When using any mode but the weak mode, you want your build to fail on some or all deprecations, but it is still nice to be able to see what you could fix without having to change modes.
d7b0236
to
9e37873
Compare
Thank you @greg0ire. |
…ot weak (greg0ire) This PR was merged into the 4.1-dev branch. Discussion ---------- Always show all deprecations except legacy ones when not weak When using any mode but the weak mode, you want your build to fail on some or all deprecations, but it is still nice to be able to see what you could fix without having to change modes. | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT <!-- - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. - Replace this comment by a description of what your PR is solving. --> Commits ------- 9e37873 Always show all deprecations except legacy ones
* 3.4: [Bridge/PhpUnit] Fix tests by backporting #25997 to 3.4
* 4.0: [Bridge/PhpUnit] Fix tests by backporting #25997 to 3.4
FYI, this PR has been backported to 3.4 in 9a9c0f6. There is now way to make tests pass otherwise, since this changes the behavior. |
The behavior has changed since symfony#25997
The behavior has changed since symfony#25997
The behavior has changed since symfony#25997
The behavior has changed since symfony#25997
This PR was squashed before being merged into the 4.1 branch (closes #28046). Discussion ---------- [PhpUnitBridge] Describe weak_vendors properly | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a The `weak_vendors` mode now displays deprecations, this behavior has changed since #25997 Commits ------- 336008c [PhpUnitBridge] Describe weak_vendors properly
When using any mode but the weak mode, you want your build to fail on some or
all deprecations, but it is still nice to be able to see what you could
fix without having to change modes.