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

PHP 8.4 class instantiation without parentheses syntax error #336

Open
sebastiansulinski opened this issue Jan 21, 2025 · 3 comments
Open
Labels
dependencies Pull requests that update a dependency file

Comments

@sebastiansulinski
Copy link

sebastiansulinski commented Jan 21, 2025

Pint Version

1.19.0

PHP Version

8.4.1

Description

Running pint on class that uses PHP 8.4 syntax for class instantiation without parentheses, we get an error:

Parse error: syntax error, unexpected token "->", expecting ")"

Steps To Reproduce

DB::table(new Tenant()->getTable()) // this is the line that produces the error
    ->select('id')
    ->get('id');
@trippo
Copy link

trippo commented Jan 24, 2025

Steps To Reproduce

new User()->toArray();

@leecolarelli-avrillo
Copy link

I have this issue too

@crynobone
Copy link
Member

@crynobone crynobone added the dependencies Pull requests that update a dependency file label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

4 participants