php-whois
php-whois copied to clipboard
Deprecation notice with PHP 8.4
PHP-Whois version: 4.1.10
PHP version: 8.4.0
Description
Class Whois uses trait WhoisDeprecated, which has the comment "will be removed in 4.2"
This code, which is unused, is not compatible wtih PHP 8.4, due to the function signature.
public static function create(ILoader $loader = null)
needs to be changed to
public static function create(?ILoader $loader = null)
It gives the error:
Fatal error: During class fetch: Uncaught ErrorException: Iodev\Whois\WhoisDeprecated::create(): Implicitly marking parameter $loader as nullable is deprecated, the explicit nullable type must be used instead in /.../vendor/io-developer/php-whois/src/Iodev/Whois/WhoisDeprecated.php:16
How to reproduce
$whois = new Whois(new CurlLoader(10));
Possible Solution
Either
- update the function signature, and create a 4.1.11 release
- remove this deprecated trait, and create a 4.2.0 release
Update - there are several other instances of "implicit null parameters".
There is also another PHP8.4 compatibility issue. Line 78 of Modules/Tld/Parsers/CommonParser.php sets dynamic properties.
Is this lib still maintained?