An imported or required file returning a callable value cannot be immediately invoked as Prettier is stripping the surrounding parentheses. (The below example assumes `file.php` contains e.g. `<?php return function() { echo 'Hello world'; };`) **@prettier/plugin-php v0.22.2** [Playground link](https://loilo.github.io/prettier-php-playground/#N4IgDgTgpgLjCWUIHkwIPYDsDOIBcok8mMA6vACYwAW+AHAAwA0IMAhgEblW14AsLAK7YoAFU648AMzYAbES2zEA5rKgBFQehhR8M+VBZhqYAGpIlWfCACsAOj4gWMCG3iyVAYXQBbH2wAFAAkA-BdBQxAOVwBjKABlGABPNWswJABaGNwWaABHQXhoANdlfz05BRBiEQgYErYytgqDAF8WKAp4GHQUNHgsSVA2bBgWkXbqzDBBMbwQAB4AfmMwAB1MAApiGNlBCigAAgByKXcoY4BKTcuAbg3N-MLoE7O1K5vbkFagA) **Input:** ```php <?php (include 'file.php')(); (require 'file.php')(); ``` **Output:** ```php <?php include "file.php"(); require "file.php"(); ``` **Expected behavior:** ```php <?php (include 'file.php')(); (require 'file.php')(); ```
Activity
tobia commentedon Nov 26, 2024
Possibly related to #2409