File tree 4 files changed +12
-5
lines changed 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 6
6
- 7.1
7
7
- 7.2
8
8
9
+ services :
10
+ - mysql
11
+ - postgresql
12
+
9
13
env :
10
14
matrix :
11
15
- DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test'
@@ -37,7 +41,7 @@ before_script:
37
41
- if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
38
42
- if [[ $DB = 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
39
43
40
- - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer; fi
44
+ - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:^3.0 ; fi
41
45
- if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan; fi
42
46
43
47
script :
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ public function untag($tags = null)
57
57
58
58
foreach ($ untags as $ untag ) {
59
59
foreach ($ tags as $ k => $ tag ) {
60
- if ((empty ($ untag [$ pk ]) || $ tag [$ pk ] === $ untag [$ pk ]) &&
60
+ if (
61
+ (empty ($ untag [$ pk ]) || $ tag [$ pk ] === $ untag [$ pk ]) &&
61
62
(empty ($ untag [$ df ]) || $ tag [$ df ] === $ untag [$ df ])
62
63
) {
63
64
unset($ tags [$ k ]);
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ public function initialize(array $config)
18
18
$ this ->setTable ('tags_tags ' );
19
19
$ this ->setDisplayField ('label ' );
20
20
$ this ->addBehavior ('Timestamp ' );
21
- if (Plugin::loaded ('Muffin/Slug ' )) {
21
+ $ method = 'isLoaded ' ;
22
+ if (!method_exists (Plugin::class, 'isLoaded ' )) {
23
+ $ method = 'loaded ' ;
24
+ }
25
+ if (Plugin::{$ method }('Muffin/Slug ' )) {
22
26
$ this ->addBehavior ('Muffin/Slug.Slug ' );
23
27
}
24
28
}
Original file line number Diff line number Diff line change 30
30
}
31
31
32
32
require $ root . '/vendor/cakephp/cakephp/tests/bootstrap.php ' ;
33
-
34
- \Cake \Core \Plugin::load ('Muffin/Tags ' , ['path ' => dirname (dirname (__FILE__ )) . DS ]);
You can’t perform that action at this time.
0 commit comments