WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Releases: prettier/plugin-php

0.15.1

17 Oct 07:24

Choose a tag to compare

  • fix: "<?php" turned into "<?=" at beginning of file (#1567, thanks @zarv1k!)
  • dependency updates

v0.15.0

04 Oct 21:32

Choose a tag to compare

  • feat: convert list to short syntax automatically (#1351)
  • dependency updates

v0.14.3

25 Jul 09:08

Choose a tag to compare

  • feat: update chain breaking heuristic (#1437, thanks @karptonite!)
  • dependency updates

v0.14.2

28 May 07:54

Choose a tag to compare

  • feat(comments): optimize printing of comments in assignments (#1435)
  • fix: update parser to fix precedence of ** and ?? (#1440)

v0.14.1

20 May 11:06

Choose a tag to compare

  • fix: update prettier peer dependency (#1389)
  • dependency updates

v0.14.0

31 Mar 17:20

Choose a tag to compare

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)

v0.13.0

20 Feb 19:36

Choose a tag to compare

v0.13.0 Pre-release
Pre-release
  • 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

v0.12.0

22 Dec 16:12

Choose a tag to compare

v0.12.0 Pre-release
Pre-release
0.12.0

v0.11.2

05 Jun 17:50

Choose a tag to compare

v0.11.2 Pre-release
Pre-release
0.11.2

v0.11.1

28 May 12:46

Choose a tag to compare

v0.11.1 Pre-release
Pre-release

Breaking changes

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