Skip to content

TypeError with Slevomat Coding Standard version 8.11.1 and PHP 8.2 #1566

Closed
@dealense7

Description

@dealense7

I am using the Slevomat Coding Standard version 8.11.1 with PHP 8.2 and I am encountering a TypeError. Specifically, I receive the following error message:

"
..PHP Fatal error: Uncaught TypeError: SlevomatCodingStandard\Helpers\Annotation\TypeAliasAnnotation::__construct(): Argument #5 ($contentNode) must be of type ?PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasTagValueNode, PHPStan\PhpDocParser\Ast\PhpDoc\GenericTagValueNode given, called in /home/houston/Documents/project/vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/AnnotationHelper.php on line 359 and defined in /home/houston/Documents/project/vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/Annotation/TypeAliasAnnotation.php:21
"

I have reviewed the code that calls the constructor method for the TypeAliasAnnotation class and confirmed that the fifth argument, $contentNode, is of the correct type ?PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasTagValueNode

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