The Wayback Machine - https://web.archive.org/web/20200416211143/https://github.com/prettier/plugin-php/releases
Skip to content

@czosel czosel released this Mar 31, 2020 · 11 commits to master since this release

Breaking change

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 printing
    • 5.3 and below: Don't force array shorthand notation
  • trailingCommaPHP: 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.

Features

This release adds support for PHP 7.3 and 7.4 🎉

  • feat: add phpVersion option (#1286)
  • fix: remove extra linebreak in nowdoc (#1287)
  • feat: deterministic printing of array shortform (#1289)
  • fix: array entry byref printing (#1293)
  • feat: numeric literal separator support (#1294)
  • fix: remove extraneous open tag for inline nodes following comments (#1338, thanks @jodysimpson)
  • fix: correctly handle right-associative ?? operator (#1345)
  • feat: print flexible heredoc/nowdoc for PHP >= 7.3 (#1291)
  • fix: Support static & return-typed arrow functions (#1362, thanks @adamaveray)
Assets 2
Pre-release
Pre-release

@czosel czosel released this Feb 20, 2020

  • 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

Assets 2
Pre-release
Pre-release

@czosel czosel released this Dec 22, 2019 · 92 commits to master since this release

0.12.0
Assets 2
Pre-release
Pre-release

@czosel czosel released this Jun 5, 2019 · 204 commits to master since this release

0.11.2
Assets 2
Pre-release
Pre-release

@czosel czosel released this May 28, 2019 · 206 commits to master since this release

Breaking changes

The trailingComma option has been renamed to trailingCommaPHP to avoid collisions with Prettier for JS (#1059).

Assets 2
May 28, 2019
0.11.0
Pre-release
Pre-release

@czosel czosel released this Feb 18, 2019 · 261 commits to master since this release

0.10.2
Assets 2
Pre-release
Pre-release

@czosel czosel released this Feb 7, 2019 · 269 commits to master since this release

0.10.1
Assets 2
Pre-release
Pre-release

@evilebottnawi evilebottnawi released this Feb 5, 2019 · 272 commits to master since this release

chore(release): 0.10.0
Assets 2
Pre-release
Pre-release

@evilebottnawi evilebottnawi released this Oct 15, 2018 · 382 commits to master since this release

v0.9.0

Assets 2
You can’t perform that action at this time.