Skip to content

Commit 74a9d43

Browse files
authored
Merge pull request #8 from UseMuffin/feat/phpunit-11
Fix error on CakePHP 5.1
2 parents 4df0736 + 50c86c7 commit 74a9d43

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ permissions:
1414
jobs:
1515
testsuite:
1616
uses: ADmad/.github/.github/workflows/testsuite-with-db.yml@master
17-
secrets: inherit
17+
secrets:
18+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1819

1920
cs-stan:
2021
uses: ADmad/.github/.github/workflows/cs-stan.yml@master
21-
secrets: inherit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"require-dev": {
3636
"cakephp/cakephp": "^5.0",
37-
"phpunit/phpunit": "^10.1"
37+
"phpunit/phpunit": "^10.1 || ^11.1"
3838
},
3939
"autoload": {
4040
"psr-4": {

src/Model/Behavior/OrderlyBehavior.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function beforeFind(EventInterface $event, SelectQuery $query, ArrayObjec
5757
*/
5858
protected function _normalizeConfig(array $orders): void
5959
{
60-
if (empty($orders)) {
60+
unset($orders['className']);
61+
62+
if ($orders === []) {
6163
$orders = [[]];
6264
} elseif (isset($orders['order']) || isset($orders['callback'])) {
6365
$orders = [$orders];

0 commit comments

Comments
 (0)