-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] Use total
for asserting deprecation count when a group is not defined
#58499
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
lyrixx
commented
Oct 8, 2024
Q | A |
---|---|
Branch? | 7.2 |
Bug fix? | no |
New feature? | no |
Deprecations? | no |
Issues | - |
License | MIT |
@@ -96,7 +96,7 @@ private function __construct(array $thresholds = [], string $regex = '', array $ | |||
} | |||
foreach ($groups as $group) { | |||
if (!isset($this->thresholds[$group])) { | |||
$this->thresholds[$group] = 999999; | |||
$this->thresholds[$group] ??= $this->thresholds['total'] ?? 999999; |
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 have an app, with a LOT OF deprecation notice.
I tried to increased the value in our setup
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[total]=2000000&verbose=0" />
but it did not worked, because the default value is 999999
.
And this is a bit "WTF", because it failed, and I had no clue why.
I had hard time to understand why.
In our app, we have theses numbers:
array:6 [
"unsilenced" => 0
"self" => 3
"direct" => 646
"indirect" => 1002531
"legacy" => 0
"other" => 686
]
62087c1
to
3e87ba4
Compare
total
for asserting deprecation count when a group is not defined
This should be documented in the changelog file. |
…oup is not defined
3e87ba4
to
02d1110
Compare
Thanks, fixed 👍🏼 |
Thank you @lyrixx. |