Skip to content

Commit 3633fe0

Browse files
authored
Merge pull request #149 from homersimpsons/fix/generated-method-order
FindBy Method Generation: Order method by name
2 parents 6abd40e + 335b1f1 commit 3633fe0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ matrix:
88
include:
99
- php: 7.2
1010
env: PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1
11+
services:
12+
- mysql
1113
- php: 7.3
1214
env: PREFER_LOWEST="" DB=mysql NO_WEAKREF=1
15+
services:
16+
- mysql
1317
- php: 7.1
1418
env: PREFER_LOWEST="" DB=mysql COVERALLS=true
19+
services:
20+
- mysql
1521
- php: 7.1
1622
env: PREFER_LOWEST="--prefer-lowest" DB=mysql
23+
services:
24+
- mysql
1725
- php: 7.1
1826
env: PREFER_LOWEST="" DB=mysql8
1927
sudo: required
@@ -22,11 +30,11 @@ matrix:
2230
- php: 7.1
2331
env: PREFER_LOWEST="" DB=mariadb
2432
addons:
25-
mariadb: '10.0'
33+
mariadb: '10.3'
2634
- php: 7.1
2735
env: PREFER_LOWEST="--prefer-lowest" DB=mariadb
2836
addons:
29-
mariadb: '10.0'
37+
mariadb: '10.3'
3038
- php: 7.1
3139
env: PREFER_LOWEST="--prefer-lowest" DB=oracle PHPUNITFILE="-c phpunit.oracle.xml"
3240
sudo: required

src/Utils/BeanDescriptor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,9 @@ private function generateFindByDaoCode(string $beanNamespace, string $beanClassN
11021102
}
11031103
}
11041104
}
1105+
usort($methods, static function (MethodGenerator $methodA, MethodGenerator $methodB) {
1106+
return $methodA->getName() <=> $methodB->getName();
1107+
});
11051108

11061109
return $methods;
11071110
}

0 commit comments

Comments
 (0)