Skip to content

Problem with PHP 8 #192

@amir-khoshbakht

Description

@amir-khoshbakht

The "otherwise" method on Promise seems to have a problem with PHP8
it will throw this exception :

#message: "Method ReflectionParameter::getClass() is deprecated"
#code: 0
#file: "./vendor/react/promise/src/functions.php"
#line: 346
#severity: E_DEPRECATED

it seems the problem is caused by :
\React\Promise\Promise - Line : 77
\React\Promise - functions.php - Line : 346

if (!$expectedException->getClass()) {

update:

This method is deprecated in the current version of PHP (8) :
Reference

This notice can be turned off using native php error_reporting() function.
Reference

run time error reporting setting :
error_reporting(error_reporting() & ~E_DEPRECATED);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions