Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.88 KB

File metadata and controls

42 lines (33 loc) · 1.88 KB
layout project
title Prettier PHP plugin
order prettier php plugin
tags
code formatter
alpha
slug prettier-php-plugin
authors
name
Mike Grip
name
Evilebot Tnawi
name
Christian Zosel
website
license
github
name
prettier/plugin-php
dependencies
node
suffix packages commands yarn npm dev
as a dev dependency
name version
prettier
latest
name version
@prettier/plugin-php
latest
description executable arguments
Run it
prettier
path/to/file.php --write
true
true
true
suffix packages commands yarn npm global
as a global dependency
name version
prettier
latest
name version
@prettier/plugin-php
latest
description executable arguments
Run it
prettier
path/to/file.php --write
true
true
true

[{{ page.title }}]({{ page.url | absolute_url }}) adds support for the PHP language to Prettier, an opinionated code formatter.

Prettier 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.

Note: this plugin can also be integrated with [php-cs-fixer]({{ site.projects | where: 'title', 'PHP Coding Standards Fixer 2' | map: 'url' | first | absolute_url }}). See docs/recipes/php-cs-fixer for integration help, code can also be found in https://gist.github.com/Billz95/9d5fad3af728b88540fa831b73261733