Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php8.4 - new without parentheses #16

Open
Marxone opened this issue Dec 21, 2024 · 1 comment
Open

php8.4 - new without parentheses #16

Marxone opened this issue Dec 21, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Marxone
Copy link

Marxone commented Dec 21, 2024

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

@ctf0
Copy link
Owner

ctf0 commented Dec 24, 2024

thank you for the headsup, however until its supported by the parser, there isnt much to do, also PRs are welcome.

@ctf0 ctf0 added enhancement New feature or request help wanted Extra attention is needed labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants