diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e0e221..22da77b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,11 @@ jobs: castor: bin: 'bin/castor' method: 'bin/castor' + - php: "8.4" + castor: + bin: 'bin/castor' + method: 'bin/castor' + allow_failures: true steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 70d15501..b56bf751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Add support for custom php.ini in compile command * Do not validate commande options/args as soon as `#[AsRawTokens] is used * Update all PHP vendor +* Add partial support for PHP 8.4 (`ssh_()` functions are not supported yet) ### Fixes diff --git a/src/Listener/ConfigureCastorListener.php b/src/Listener/ConfigureCastorListener.php index b6e50bd7..2c8179f4 100644 --- a/src/Listener/ConfigureCastorListener.php +++ b/src/Listener/ConfigureCastorListener.php @@ -28,7 +28,7 @@ public function configureCastor(BeforeBootEvent $event): void $this->logger->pushHandler(new ConsoleHandler($this->output)); } - $this->errorHandler->setDefaultLogger($this->logger, [ + $map = [ \E_COMPILE_WARNING => LogLevel::WARNING, \E_CORE_WARNING => LogLevel::WARNING, \E_USER_WARNING => LogLevel::WARNING, @@ -43,8 +43,13 @@ public function configureCastor(BeforeBootEvent $event): void \E_ERROR => LogLevel::ERROR, \E_PARSE => LogLevel::ERROR, \E_RECOVERABLE_ERROR => LogLevel::ERROR, - \E_STRICT => LogLevel::ERROR, \E_USER_ERROR => LogLevel::ERROR, - ]); + ]; + + if (\PHP_VERSION_ID < 80400) { + $map[\E_STRICT] = LogLevel::ERROR; + } + + $this->errorHandler->setDefaultLogger($this->logger, $map); } }