PHP 8.4 Compatibility
swissspidy opened this issue · comments
Pascal Birchler commented
This is a general tracking issue for PHP 8.4 compatibility throughout WP-CLI.
Some known issues / blockers:
Broken unit/Behat tests
Unit tests and Behat tests are currently not working on PHP 8.4 due to the bundled Requests v1 triggering an error:
Update: looks like this was fixed in PHP 8.4, so there is no longer any fatal error.
Details
TypeError: curl_setopt(): Argument #3 ($value) must be a valid callback for option CURLOPT_HEADERFUNCTION, no array or string given
/home/runner/work/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Curl.php:223
/home/runner/work/wp-cli/wp-cli/bundle/rmccue/requests/src/Requests.php:469
Maybe a good time to migrate to Requests v2?
This is also an issue in v2 though:
TypeError: curl_setopt(): Argument #3 ($value) must be a valid callback for option CURLOPT_HEADERFUNCTION, no array or string given
/tmp/wordpress/wp-includes/Requests/src/Transport/Curl.php:223
/tmp/wordpress/wp-includes/Requests/src/Requests.php:469
So this needs to get fixed in https://github.com/WordPress/Requests
Related:
Deprecation notices in Composer
Some examples:
Deprecation Notice: Composer\Pcre\Preg::replace(): Implicitly marking parameter $count as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/local/bin/composer/vendor/composer/pcre/src/Preg.php:150
Deprecation Notice: Composer\Pcre\Preg::replaceCallback(): Implicitly marking parameter $count as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/local/bin/composer/vendor/composer/pcre/src/Preg.php:177
Deprecation Notice: Composer\Pcre\Preg::replaceCallbackArray(): Implicitly marking parameter $count as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/local/bin/composer/vendor/composer/pcre/src/Preg.php:207
Deprecation Notice: JsonSchema\Constraints\BaseConstraint::__construct(): Implicitly marking parameter $factory as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php:41
Deprecation Notice: JsonSchema\Constraints\BaseConstraint::addError(): Implicitly marking parameter $path as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php:46
Question is whether those are only shown during development or also when using wp package *
.