Skip to content

Commit

Permalink
Show warning regarding PHP 8.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jubeki committed Nov 29, 2024
1 parent fc6a920 commit c77a1bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Commands/DefaultCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ protected function configure()
*/
public function handle($fixCode, $elaborateSummary)
{
if (! ($_ENV['PINT_IGNORE_ENV'] ?? false) && version_compare(PHP_VERSION, '8.4.0', '>=')) {
$this->warn('PHP 8.4 is not supported yet. Please downgrade to PHP 8.3 or lower.');
$this->warn('You can still run (though not recommended) by setting the environment variable:');
$this->warn('PINT_IGNORE_ENV=1 vendor/bin/pint');

return 1;
}

[$totalFiles, $changes] = $fixCode->execute();

return $elaborateSummary->execute($totalFiles, $changes);
Expand Down

0 comments on commit c77a1bd

Please sign in to comment.