{"repo":"prettier/plugin-php","free":true,"listed":false,"github":"https://github.com/prettier/plugin-php","clone":"git clone https://github.com/prettier/plugin-php.git","description":"Prettier PHP Plugin","language":"PHP","stars":1854,"topics":["prettier","php","printer","php7","php5","formatter","beautifier","autoformat"],"license":"MIT","category":"dev-tools","readme_excerpt":"Prettier PHP Plugin Intro Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. This plugin adds support for the PHP language to Prettier. [!NOTE] This plugin uses PSR / PER as guidance when making formatting decisions, but does not aim to be fully PSR / PER compliant. The idea is to stay reasonably close to how Prettier for JS works. Can this be used in production? We're considering the plugin to be stable when pure PHP files are formatted. Formatting of files that contain mixed PHP and HTML is still considered unstable - please see open issues with the tag \"inline\" for details. If you want to use the plugin in production, we recommend limiting its scope to pure PHP files. Input Output Playground You can give the plugin a try in our playground! Install yarn: npm: Activate the plugin Create or modify your prettier configuration file to activate the plugin: Use With Node.js If you installed prettier as a local dependency, you can add prettier as a script in your package.json , and then run it via If you installed globally, run In the Browser This package exposes a standalone.js that can be used alongside Prettier's own standalone.js to make the PHP plugin work in browsers without a compile step. First, grab both standalone scripts from an npm CDN like unpkg: Then use Prettier with PHP, just like this: See this code in acti","default_branch":null,"files":null,"tree":[],"storefront":"/r/prettier","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/prettier/plugin-php/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}