pint icon indicating copy to clipboard operation
pint copied to clipboard

PHP 8.4 class instantiation without parentheses syntax error

Open sebastiansulinski opened this issue 11 months ago • 4 comments

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');

sebastiansulinski avatar Jan 21 '25 13:01 sebastiansulinski

Steps To Reproduce

new User()->toArray();

trippo avatar Jan 24 '25 13:01 trippo

I have this issue too

leecolarelli-avrillo avatar Feb 06 '25 11:02 leecolarelli-avrillo

Pending https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/milestone/173

crynobone avatar Feb 08 '25 01:02 crynobone

Any indication when will this be implemented please?

sebastiansulinski avatar Apr 07 '25 10:04 sebastiansulinski