Skip to content

Deprecation notice with PHP 8.4 #225

@fisharebest

Description

@fisharebest

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions