Open dvlpr91 opened 8 months ago
I'm here to report this issue too. The syntax is taken from Laravel 11's public/index.php
file.
Same
Is there are plan to fix this one?
// public/index.php
...
// Bootstrap Laravel and handle the request...
$app = require_once __DIR__ . '/../bootstrap/app.php';
$app->handleRequest(Request::capture());
// artisan
...
// Bootstrap Laravel and handle the command...
$app = require_once __DIR__ . '/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput());
exit($status);
It also removes the parentheses from the nameless class definition in Laravel 11 migrations.
There are parentheses after the class
keyword:
return new class () extends Migration {
Run Prettier, and they’re gone:
return new class extends Migration {
The PER Coding Style 2.0 requires parentheses when instantiating a new class: https://www.php-fig.org/per/coding-style/#4-classes-properties-and-methods
@prettier/plugin-php v0.22.2 Playground link
Input:
Output: