You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a PHP Prettier parse exception when ::class is called on a class property. This is a contrived example, but the following is a minimal reproducible example that throws an exception when checked:
class Test
{
public $exception;
public function test()
{
$this->exception = new \Exception("test");
return $this->exception::class; // Throws "SyntaxError: Parse Error : syntax error, unexpected 'class' (T_CLASS)"
}
}
Happens on the PHP Prettier playground and my local with:
Node 18.20.5
Prettier 3.4.2
PHP Prettier 0.22.2
The text was updated successfully, but these errors were encountered:
There seems to be a PHP Prettier parse exception when
::class
is called on a class property. This is a contrived example, but the following is a minimal reproducible example that throws an exception when checked:Happens on the PHP Prettier playground and my local with:
18.20.5
3.4.2
0.22.2
The text was updated successfully, but these errors were encountered: