Skip to content

Commit 1ba2231

Browse files
authored
Update to PHPUnit 10 (#478)
* move to phpunit10 and update CodeIgniter coding-standard * cs fix * fix phpunit workflow
1 parent 37dd49c commit 1ba2231

File tree

10 files changed

+363
-517
lines changed

10 files changed

+363
-517
lines changed

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
fi
6161
6262
- name: Test with PHPUnit
63-
run: vendor/bin/phpunit --verbose --coverage-text
63+
run: vendor/bin/phpunit --coverage-text
6464
env:
6565
TERM: xterm-256color
6666
TACHYCARDIA_MONITOR_GA: enabled

app/Controllers/Contribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function index()
1717
$data['contributors'][$id] = array_slice($contributors, 0, 12);
1818
}
1919
} catch (ClientExceptionInterface $e) {
20-
log_message('error', '[' . __METHOD__ . '] ' . get_class($e) . ': ' . $e->getMessage());
20+
log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage());
2121

2222
$data['contributors'] = null;
2323
}

app/Controllers/Download.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function index()
1919
'v4link' => end($releases['framework4'])->download_url,
2020
];
2121
} catch (ClientExceptionInterface $e) {
22-
log_message('error', '[' . __METHOD__ . '] ' . get_class($e) . ': ' . $e->getMessage());
22+
log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage());
2323

2424
$data = [
2525
'v3name' => '<em>unknown</em>',

app/Controllers/Home.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function index()
1818
'forks_count' => number_format($repos['codeigniter4']->forks_count),
1919
];
2020
} catch (ClientExceptionInterface $e) {
21-
log_message('error', '[' . __METHOD__ . '] ' . get_class($e) . ': ' . $e->getMessage());
21+
log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage());
2222

2323
$data = [
2424
'html_url' => 'https://github.com/codeigniter4/CodeIgniter4',

app/Libraries/GitHub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function getReleases(): array
143143

144144
foreach ($this->config->repos as $id => $segments) {
145145
// We only care about frameworks
146-
if (strpos($id, 'framework') === false) {
146+
if (! str_contains($id, 'framework')) {
147147
continue;
148148
}
149149

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"psr/container": "^2.0"
3333
},
3434
"require-dev": {
35-
"codeigniter/coding-standard": "1.7.*",
35+
"codeigniter/coding-standard": "1.8.*",
3636
"codeigniter4/devkit": "^1.0",
37-
"phpunit/phpunit": "^9.6",
37+
"phpunit/phpunit": "^10.5.41",
3838
"tatter/patches": "^2.0"
3939
},
4040
"minimum-stability": "dev",

0 commit comments

Comments
 (0)