Skip to content

Implicit nullable parameters causes deprecation warnings on PHP 8.4+ #60

@Bongo9911

Description

@Bongo9911

When using the php-mock library on PHP 8.4 I'm getting the following warnings when running my tests:

phpmock\spy\Spy::__construct(): Implicitly marking parameter $function as nullable is deprecated, the explicit nullable type must be used instead

phpmock\spy\Invocation::__construct(): Implicitly marking parameter $exception as nullable is deprecated, the explicit nullable type must be used instead

Since explicit nullable parameter support was added in PHP 7.1, I believe a fix for this would require either bumping the minimum version to 7.1 (from 5.6) or removing the explicit declaration of the type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions