Skip to content

PHP 8.4 compatibility issues #161

Open
@stonie1989

Description

@stonie1989

Are there plans to make Pawl fully compatible to PHP 8.4?
Currently there are some deprecation warnings regarding the Client connect() function.

Deprecated: Ratchet\Client\connect(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in vendor/ratchet/pawl/src/functions.php on line 12 PHP Deprecated: Ratchet\Client\connect(): Implicitly marking parameter $loop as nullable is deprecated, the explicit nullable type must be used instead in vendor/ratchet/pawl/src/functions.php on line 12

Edit:
Would be a very simple change in one line:

From

function connect($url, array $subProtocols = [], $headers = [], LoopInterface $loop = null) {
    $connector = new Connector($loop);
    $connection = $connector($url, $subProtocols, $headers);

    return $connection;
}

To:

function connect($url, array $subProtocols = [], $headers = [], LoopInterface|null $loop = null) {
    $connector = new Connector($loop);
    $connection = $connector($url, $subProtocols, $headers);

    return $connection;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions