plugin-php
plugin-php copied to clipboard
Prettier PHP Plugin
This adds support for formatting things like `(new Foo())->bar` as `new Foo()->bar`. Support for this syntax was [added in PHP 8.4](https://www.php.net/releases/8.4/en.php#new_without_parentheses) and [very recently merged and released](https://github.com/glayzzle/php-parser/pull/1146) in php-parser. **Note**...
If I don't use that keyword, it gives errors with formatting if typing full namespace under an if statement (I think) or only for local namespaces (ServerError is locally in...
PHP 8.3 is supported, right? It's not in the allowed choices from `phpVersion` options... ``` phpVersion: { since: "0.13.0", category: CATEGORY_PHP, type: "choice", default: "7.0", description: "Minimum target PHP version.",...
whats wrong?
My projects separates the PHP and Node apps like so ``` / ├── cms/ │ └── composer.json │ └── vendor/ │ └── etc... ├── buildchain/ │ └── package.json │ └──...
**@prettier/plugin-php v0.22.2** [Playground link](https://loilo.github.io/prettier-php-playground/#N4IgDgTgpgLjCWUIHkwIPYDsDOIBcok8mMA6vACYwAW+AHAAwA0IMAhgEblW14AsLAK7YoAFU648AMzYAbES2zEA5rKgBFQehhR8MCIKgsw1MADUkSrPhB0AdAxAt9beLJUBhdAFtvbAAoAEv56BkYgHBBsAMZQAMowAJ5qNmBIALTRuCzQAI6C8ND+Ucp++DLy4cQiEDDFbKVs5XIiAL4sUBTwMOgoaPBYkqBs2DDNle0gxGCCY3ggADwA-CZgADqYAPQAVNsbAATb+6IA7lBsANYn8CL7AGT7AKLe8NHo+wAU1HBg2HibmxOQLsMDOl2uIjsb28m3u+2+MF+-0BwKgLzedkwsk2AEp9ul9gBBWSyfYAJXgym+2HJUBqADdOgc9phDvsAAJvMCJCCU777Lzc3lUmCfaJ4gBMDAAjAB2dJSuXHMFXG5QKE+fYAITsZjsnwRSIBQJOIJVEPV0JxzI57liOCg+ydhuR6DSOHQgggsTsvWUmztUAd2E26GwsnSAGYHHZVk7UEH9nF0FJQWxoPsADKvIO3D7IOKZ-bRhjW1nbTYbDYA-arLJ4LrYThqfZBfxebxgNgIDhubqJOwAWRusRJbEwUE92DsZLR6EZFGJOggmG78EZbfEymng7YiQ4UEJcX8CcwW4AYp7MBQNksAHxVzALbDRXlofaUAC8axAbFm6GhMA1B0dJujRdIdE7WRuygH99iSNJv1YKAAA8YE2FD0j8ZQgx6CC0SAmC4Iobs2HSL1ZCQ5ZP32AASDhZAAi50jvHCYEJAArNgUIAVQgWQPjxe8fwfJ9NhfN8YFEjZllWA4nX2Gs6z+INm0dNsOy7Hs+ySIcRygMcJynGc5wXJckFXBAN2CLcdz3A8jxPd0LyvG9MHvEBWiAA) **Input:** ```php
This plug-in is terrible, installed globally without any effect, must be project-specific can,For example, I usually open a file to format, I have to install the npm package in the...
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...
This code, which recursively computes the 10th Fibonacci number: ```php $result = ($fib = function($n) use (&$fib) { return $n
I was just looking for the current status regarding: ``` ... Formatting of files that contain mixed PHP and HTML is still considered unstable - please see open issues with...