Prettier PHP Plugin
MIT License
This release introduces the new option phpVersion
. Depending on the options you're using, the upgrade requires some changes to your configuration:
phpVersion
: This new option allows the plugin to produce output which is optimized for the PHP version you're running. The following values are supported:
7.1
, 7.0
, 5.6
, 5.5
, 5.4
: Since our formatting doesn't change between these versions, all of them are equivalent. This category is used by default.
7.2
: Print trailing commas in "use"7.3
, 7.4
: Print trailing commas in function calls, flexible heredoc/nowdoc printing5.3
and below: Don't force array shorthand notationtrailingCommaPHP
: All options except none
and all
have been removed and the option now requires a Boolean value. If you've been using a setting like php7.2
before, change it to true
and set phpVersion
to 7.2
.
For more information please see #1280.
This release adds support for PHP 7.3 and 7.4 🎉
feat: update parser and add arrow function support (#1277)
fix(switch): inconsistent line spreading (#1256)
fix(retif): correct parentheses for bin in retif (#1257)
fix: shorthand echo as first node (#1266)
fix: flexible heredoc/nowdoc syntax (#1269)
fix: namespace followed by inline node (#1265)
fix: insert pragma when first docblock mid-file (#1310)
dependency updates
The trailingComma
option has been renamed to trailingCommaPHP
to avoid collisions with Prettier for JS (https://github.com/prettier/plugin-php/pull/1059).
Published by alexander-akait over 5 years ago
Published by alexander-akait about 6 years ago
v0.9.0
Published by alexander-akait about 6 years ago
v0.8.0
Published by alexander-akait about 6 years ago
Published by mgrip over 6 years ago