Skip to content

Commit fe344d6

Browse files
[PhpUnitBridge] limit the list of deprecations to 5 per message
1 parent 81f5e8e commit fe344d6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

DeprecationErrorHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,14 @@ private function displayDeprecations($groups, $configuration, $isFailing)
331331

332332
$countsByCaller = $notice->getCountsByCaller();
333333
arsort($countsByCaller);
334+
$limit = 5;
334335

335336
foreach ($countsByCaller as $method => $count) {
336337
if ('count' !== $method) {
338+
if (!$limit--) {
339+
fwrite($handle, " ...\n");
340+
break;
341+
}
337342
fwrite($handle, sprintf(" %dx in %s\n", $count, preg_replace('/(.*)\\\\(.*?::.*?)$/', '$2 from $1', $method)));
338343
}
339344
}

0 commit comments

Comments
 (0)