Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bpolaszek committed Jun 19, 2018
1 parent 39ab530 commit c953aa9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions DependencyInjection/Compiler/CustomHandlersPass.php
Expand Up @@ -95,12 +95,7 @@ private function sortAndFlattenHandlersList(array $allHandlers)
$sorter = function ($a, $b) {
return $b[3] == $a[3] ? 0 : ($b[3] > $a[3] ? 1 : -1);
};
// php 7 sorting is stable, while php 5 is not, and we need it stable to have consistent tests
if (PHP_MAJOR_VERSION < 7) {
self::stable_uasort($allHandlers, $sorter);
} else {
uasort($allHandlers, $sorter);
}
self::stable_uasort($allHandlers, $sorter);
$handlers = [];
foreach ($allHandlers as $handler) {
list ($direction, $type, $format, $priority, $service, $method) = $handler;
Expand Down

0 comments on commit c953aa9

Please sign in to comment.