Skip to content

Commit

Permalink
Merge pull request #8 from UseMuffin/feat/phpunit-11
Browse files Browse the repository at this point in the history
Fix error on CakePHP 5.1
  • Loading branch information
ADmad authored Oct 29, 2024
2 parents 4df0736 + 50c86c7 commit 74a9d43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ permissions:
jobs:
testsuite:
uses: ADmad/.github/.github/workflows/testsuite-with-db.yml@master
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

cs-stan:
uses: ADmad/.github/.github/workflows/cs-stan.yml@master
secrets: inherit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"require-dev": {
"cakephp/cakephp": "^5.0",
"phpunit/phpunit": "^10.1"
"phpunit/phpunit": "^10.1 || ^11.1"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 3 additions & 1 deletion src/Model/Behavior/OrderlyBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public function beforeFind(EventInterface $event, SelectQuery $query, ArrayObjec
*/
protected function _normalizeConfig(array $orders): void
{
if (empty($orders)) {
unset($orders['className']);

if ($orders === []) {
$orders = [[]];
} elseif (isset($orders['order']) || isset($orders['callback'])) {
$orders = [$orders];
Expand Down

0 comments on commit 74a9d43

Please sign in to comment.