diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 45493c345..7be6843b7 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ["7.3", "7.4", "8.0"] + php-versions: ["7.4", "8.0"] name: php-lint diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 6bbc5d192..fdd9bc9b1 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -75,7 +75,7 @@ jobs: # do not stop on another job's failure fail-fast: false matrix: - php-versions: ['7.3', '7.4'] + php-versions: ['7.4', '8.0'] databases: ['mysql'] server-versions: ['master'] diff --git a/lib/Controller/APIv2Controller.php b/lib/Controller/APIv2Controller.php index 0fcb7171c..31c14601d 100644 --- a/lib/Controller/APIv2Controller.php +++ b/lib/Controller/APIv2Controller.php @@ -229,10 +229,10 @@ public function listFilters(): DataResponse { // php 5.6 has problems with usort and objects usort($filters, static function (array $a, array $b) { if ($a['priority'] === $b['priority']) { - return (int) ($a['id'] > $b['id']); + return ($a['id'] > $b['id']) ? 1 : -1; } - return (int) ($a['priority'] > $b['priority']); + return $a['priority'] - $b['priority']; }); return new DataResponse($filters);