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 Application to support PHP 8.4 #218

Merged
merged 8 commits into from
Jan 23, 2025
Merged
Changes from 2 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 src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,31 @@
public function shutdown(int $exitCode): void
{
if ($this->dispatcher !== null) {
$this->dispatcher->dispatch(new ApplicationShutdown($exitCode));

Check warning on line 48 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function shutdown(int $exitCode) : void { if ($this->dispatcher !== null) { - $this->dispatcher->dispatch(new ApplicationShutdown($exitCode)); + } } public function renderThrowable(Throwable $e, OutputInterface $output) : void
}
}

public function renderThrowable(Throwable $e, OutputInterface $output): void
{
$output->writeln('', OutputInterface::VERBOSITY_QUIET);

Check warning on line 54 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function renderThrowable(Throwable $e, OutputInterface $output) : void { - $output->writeln('', OutputInterface::VERBOSITY_QUIET); + $this->doRenderThrowable($e, $output); } protected function doRenderThrowable(Throwable $e, OutputInterface $output) : void

$this->doRenderThrowable($e, $output);
}

protected function doRenderThrowable(Throwable $e, OutputInterface $output): void
{
parent::doRenderThrowable($e, $output);

Check warning on line 61 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } protected function doRenderThrowable(Throwable $e, OutputInterface $output) : void { - parent::doRenderThrowable($e, $output); + // Friendly Exception support if ($e instanceof FriendlyExceptionInterface) { if ($output instanceof StyleInterface) {

// Friendly Exception support
if ($e instanceof FriendlyExceptionInterface) {
if ($output instanceof StyleInterface) {
$output->title($e->getName());

Check warning on line 66 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ // Friendly Exception support if ($e instanceof FriendlyExceptionInterface) { if ($output instanceof StyleInterface) { - $output->title($e->getName()); + if (($solution = $e->getSolution()) !== null) { $output->note($solution); }
if (($solution = $e->getSolution()) !== null) {
$output->note($solution);
}
$output->newLine();

Check warning on line 70 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ if (($solution = $e->getSolution()) !== null) { $output->note($solution); } - $output->newLine(); + } else { $output->writeln('<fg=red>' . $e->getName() . '</>'); if (($solution = $e->getSolution()) !== null) {
} else {
$output->writeln('<fg=red>' . $e->getName() . '</>');

Check warning on line 72 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ } $output->newLine(); } else { - $output->writeln('<fg=red>' . $e->getName() . '</>'); + $output->writeln($e->getName() . '<fg=red>' . '</>'); if (($solution = $e->getSolution()) !== null) { $output->writeln('<fg=yellow>' . $solution . '</>'); }

Check warning on line 72 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ } $output->newLine(); } else { - $output->writeln('<fg=red>' . $e->getName() . '</>'); + $output->writeln($e->getName() . '</>'); if (($solution = $e->getSolution()) !== null) { $output->writeln('<fg=yellow>' . $solution . '</>'); }

Check warning on line 72 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ } $output->newLine(); } else { - $output->writeln('<fg=red>' . $e->getName() . '</>'); + $output->writeln('<fg=red>' . '</>'); if (($solution = $e->getSolution()) !== null) { $output->writeln('<fg=yellow>' . $solution . '</>'); }

Check warning on line 72 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ } $output->newLine(); } else { - $output->writeln('<fg=red>' . $e->getName() . '</>'); + $output->writeln('<fg=red>' . '</>' . $e->getName()); if (($solution = $e->getSolution()) !== null) { $output->writeln('<fg=yellow>' . $solution . '</>'); }

Check warning on line 72 in src/Application.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.3-ubuntu-latest

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ } $output->newLine(); } else { - $output->writeln('<fg=red>' . $e->getName() . '</>'); + $output->writeln('<fg=red>' . $e->getName()); if (($solution = $e->getSolution()) !== null) { $output->writeln('<fg=yellow>' . $solution . '</>'); }
if (($solution = $e->getSolution()) !== null) {
$output->writeln('<fg=yellow>' . $solution . '</>');
}
Expand All @@ -87,7 +87,7 @@
->addOption($options);
}

public function extractNamespace(string $name, int $limit = null): string
public function extractNamespace(string $name, ?int $limit = null): string
{
return parent::extractNamespace(str_replace('/', ':', $name), $limit);
}
Expand Down
Loading