Skip to content

Commit

Permalink
Update to PHPUnit 10 (#478)
Browse files Browse the repository at this point in the history
* move to phpunit10 and update CodeIgniter coding-standard

* cs fix

* fix phpunit workflow
  • Loading branch information
michalsn authored Feb 20, 2025
1 parent 37dd49c commit 1ba2231
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 517 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
fi
- name: Test with PHPUnit
run: vendor/bin/phpunit --verbose --coverage-text
run: vendor/bin/phpunit --coverage-text
env:
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled
Expand Down
2 changes: 1 addition & 1 deletion app/Controllers/Contribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function index()
$data['contributors'][$id] = array_slice($contributors, 0, 12);
}
} catch (ClientExceptionInterface $e) {
log_message('error', '[' . __METHOD__ . '] ' . get_class($e) . ': ' . $e->getMessage());
log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage());

$data['contributors'] = null;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Controllers/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function index()
'v4link' => end($releases['framework4'])->download_url,
];
} catch (ClientExceptionInterface $e) {
log_message('error', '[' . __METHOD__ . '] ' . get_class($e) . ': ' . $e->getMessage());
log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage());

$data = [
'v3name' => '<em>unknown</em>',
Expand Down
2 changes: 1 addition & 1 deletion app/Controllers/Home.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function index()
'forks_count' => number_format($repos['codeigniter4']->forks_count),
];
} catch (ClientExceptionInterface $e) {
log_message('error', '[' . __METHOD__ . '] ' . get_class($e) . ': ' . $e->getMessage());
log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage());

$data = [
'html_url' => 'https://github.com/codeigniter4/CodeIgniter4',
Expand Down
2 changes: 1 addition & 1 deletion app/Libraries/GitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function getReleases(): array

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

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"psr/container": "^2.0"
},
"require-dev": {
"codeigniter/coding-standard": "1.7.*",
"codeigniter/coding-standard": "1.8.*",
"codeigniter4/devkit": "^1.0",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^10.5.41",
"tatter/patches": "^2.0"
},
"minimum-stability": "dev",
Expand Down
Loading

0 comments on commit 1ba2231

Please sign in to comment.