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

Deprecation warnings about implicit null

Open tminich opened this issue 3 months ago • 2 comments

After updating to the latest version there are still two warnings I get about implicit null in the constructor of HibpHttp:

PHP Deprecated:  Icawebdesign\Hibp\HibpHttp::__construct(): Implicitly marking parameter $apiKey as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/icawebdesign/hibp-php/src/HibpHttp.php on line 15
PHP Deprecated:  Icawebdesign\Hibp\HibpHttp::__construct(): Implicitly marking parameter $client as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/icawebdesign/hibp-php/src/HibpHttp.php on line 15

I've also noticed there is more implicit null in BreachInterface.

I can create and submit a PR if you want.

tminich avatar Aug 05 '25 08:08 tminich

After updating to the latest version there are still two warnings I get about implicit null in the constructor of HibpHttp:

PHP Deprecated:  Icawebdesign\Hibp\HibpHttp::__construct(): Implicitly marking parameter $apiKey as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/icawebdesign/hibp-php/src/HibpHttp.php on line 15
PHP Deprecated:  Icawebdesign\Hibp\HibpHttp::__construct(): Implicitly marking parameter $client as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/icawebdesign/hibp-php/src/HibpHttp.php on line 15

I've also noticed there is more implicit null in BreachInterface.

I can create and submit a PR if you want.

There are various things that need to be resolved for PHP 8.4, this being one of them and something I have started to address in the 7.x branch, but that's not close to release yet as there's larger changes to the architecture for that major release to bring a few things more up to date with newer versions of PHP.

This said, I'm always open to any PRs.. so more than happy for you to submit one, thank you for the offer 🙂

digiservnet avatar Aug 11 '25 20:08 digiservnet

Great, I'll take a look once I have some time available.

tminich avatar Aug 12 '25 11:08 tminich