cloudflare-php icon indicating copy to clipboard operation
cloudflare-php copied to clipboard

Explicitly declare nullable types to fix deprecation in PHP 8.4

Open xPaw opened this issue 10 months ago • 4 comments

PHP 8.4 deprecates implicitly nullable types.

You get a deprecation warning like so:

Cloudflare\API\Endpoints\Zones::cachePurge(): Implicitly marking parameter $hosts as nullable is deprecated, the explicit nullable type must be used instead in src/Endpoints/Zones.php:246

Nullable types are available since 7.1.0. There is CI action for PHP 7.0, but the composer requires has "php": ">=7.2.5"

xPaw avatar Jan 02 '25 18:01 xPaw