From 0f395dad43bb0ab7c2e7ac5751776e9aeeb42036 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 9 Jul 2024 15:57:26 +0200 Subject: Initial support for PHP 8.4 (#6615) * Initial support for PHP 8.4 Sole fix needed so far seems to be related to https://wiki.php.net/rfc/deprecate-implicitly-nullable-types See also upstream PR https://github.com/PhpGt/CssXPath/pull/227 We are also hitting was seems to be a PHP bug https://github.com/php/php-src/issues/14873 * Fix return type * Disable OPCache while waiting for PHP fix --- cli/CliOptionsParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/CliOptionsParser.php') diff --git a/cli/CliOptionsParser.php b/cli/CliOptionsParser.php index f75f6c19a..9fb50a4ff 100644 --- a/cli/CliOptionsParser.php +++ b/cli/CliOptionsParser.php @@ -43,7 +43,7 @@ abstract class CliOptionsParser { * @param string $defaultInput If not null this value is received as input in all cases where no * user input is present. e.g. set this if you want an option to always return a value. */ - protected function addOption(string $name, CliOption $option, string $defaultInput = null): void { + protected function addOption(string $name, CliOption $option, ?string $defaultInput = null): void { $this->inputs[$name] = [ 'defaultInput' => is_string($defaultInput) ? [$defaultInput] : $defaultInput, 'required' => null, -- cgit v1.2.3