prettier / plugin-php

Prettier PHP Plugin
https://loilo.github.io/prettier-php-playground/
MIT License
1.74k stars 128 forks source link

Removes brackets from require_once which changes the evaluation of the expression (Laravel 11 index.php) #2344

Closed timmylindh closed 6 months ago

timmylindh commented 6 months ago

@prettier/plugin-php v0.22.2 Playground link

Input:

<?php

(require_once __DIR__ . '/../bootstrap/app.php')->handleRequest(
    Request::capture(),
);

Output:

<?php

require_once __DIR__ . "/../bootstrap/app.php"->handleRequest(
    Request::capture(),
);