Skip to content

php8.4 - new without parentheses #16

Open
@Marxone

Description

@Marxone

Looks the current version 0.5.3 does cannot handle new PHP 8.4 syntax with class methods without extra parentheses

$name = (new ReflectionClass($objectOrClass))->getShortName();
into
$name = new ReflectionClass($objectOrClass)->getShortName();

The moment the shortened syntax is present, php-parser (3.1.4) library throws an error.

There is pending pull request on the library
glayzzle/php-parser#1145

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions