Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation notice with PHP 8.4 #225

Open
fisharebest opened this issue Dec 19, 2024 · 1 comment
Open

Deprecation notice with PHP 8.4 #225

fisharebest opened this issue Dec 19, 2024 · 1 comment

Comments

@fisharebest
Copy link

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

  1. update the function signature, and create a 4.1.11 release
  2. remove this deprecated trait, and create a 4.2.0 release
@fisharebest
Copy link
Author

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.

fisharebest added a commit to fisharebest/php-whois that referenced this issue Dec 19, 2024
fisharebest added a commit to fisharebest/php-whois that referenced this issue Dec 20, 2024
olaulau added a commit to olaulau/IspAdmin that referenced this issue Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant