Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to PHPUnit 10 #478

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
'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());

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "Concat": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', __METHOD__ . '[' . '] ' . $e::class . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . '] ' . $e::class . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "Concat": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . '] ' . __METHOD__ . $e::class . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . __METHOD__ . $e::class . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "Concat": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . __METHOD__ . $e::class . '] ' . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . __METHOD__ . '] ' . ': ' . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . __METHOD__ . '] ' . $e::class . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "Concat": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . __METHOD__ . '] ' . ': ' . $e::class . $e->getMessage()); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

Check warning on line 21 in app/Controllers/Home.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "Concat": @@ @@ $repos = $this->github->getRepos(); $data = ['html_url' => $repos['framework4']->html_url, 'stargazers_count' => number_format($repos['codeigniter4']->stargazers_count), 'forks_count' => number_format($repos['codeigniter4']->forks_count)]; } catch (ClientExceptionInterface $e) { - log_message('error', '[' . __METHOD__ . '] ' . $e::class . ': ' . $e->getMessage()); + log_message('error', '[' . __METHOD__ . '] ' . $e::class . $e->getMessage() . ': '); $data = ['html_url' => 'https://github.com/codeigniter4/CodeIgniter4', 'stargazers_count' => '', 'forks_count' => '']; } echo $this->render('home', $data); } }

$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
Loading