Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c45c6e5

Browse filesBrowse files
committed
bug #31999 [PhpunitBridge] Restore php 5.5 compat (greg0ire)
This PR was merged into the 4.3 branch. Discussion ---------- [PhpunitBridge] Restore php 5.5 compat | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a The `ARRAY_FILTER_USE_KEY` constant was introduced in php 5.6, let us avoid it for now. See https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-changelog Thanks @alcaeus for spotting this in https://travis-ci.org/doctrine/DoctrineBundle/jobs/543340482#L596 Commits ------- 496c118 Restore compatibility with php 5.5
2 parents ac1a660 + 496c118 commit c45c6e5
Copy full SHA for c45c6e5

File tree

Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed

‎src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Configuration.php
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ public function isEnabled()
9090
*/
9191
public function tolerates(array $deprecations)
9292
{
93-
$deprecationCounts = array_filter($deprecations, function ($key) {
94-
return false !== strpos($key, 'Count') && false === strpos($key, 'legacy');
95-
}, ARRAY_FILTER_USE_KEY);
93+
$deprecationCounts = [];
94+
foreach ($deprecations as $key => $deprecation) {
95+
if (false !== strpos($key, 'Count') && false === strpos($key, 'legacy')) {
96+
$deprecationCounts[$key] = $deprecation;
97+
}
98+
}
9699

97100
if (array_sum($deprecationCounts) > $this->thresholds['total']) {
98101
return false;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.