PrettyPHP for Visual Studio CodeThe opinionated formatter for modern, expressive PHPThis extension integrates the latest release of PrettyPHP, a code formatter inspired by Black, with Visual Studio Code. Like Black, PrettyPHP runs with sensible defaults and doesn't need to be configured. It's also deterministic (with some pragmatic exceptions), so no matter how the input is formatted, it produces the same output.
RequirementsPrettyPHP requires PHP 7.4, 8.0, 8.1, or 8.2 with a CLI runtime and the The FAQHow is PrettyPHP different to other formatters?It's opinionated
It's a formatter, not a fixer
(Some pragmatic exceptions are made.) It's CI-friendly
It's safe
It's optionally compatible with coding standardsPrettyPHP has partial support for PSR-12. An upcoming release will offer full support. Why are there so many options?Because PrettyPHP is in initial development, PHP formatting is complicated, and testing is easier when settings can be changed at runtime. Over time, PrettyPHP will become more opinionated and have fewer options, so reliance on formatting options is discouraged. |