Skip to content

Commit 53cd1d8

Browse files
authored
fix(docs): update README for 0.14.0 (#1290)
1 parent 0e6b578 commit 53cd1d8

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,16 @@ prettier.format(YOUR_CODE, {
160160

161161
## Configuration
162162

163-
Prettier for PHP supports the following options:
163+
Prettier for PHP supports the following options. We recommend that all users set the `phpVersion` option.
164164

165165
| Name | Default | Description |
166166
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
167+
| `phpVersion` | `"5.4"` | Allows specifying the PHP version you're using. If you're using PHP 7.1 or later, setting this option will make use of modern language features in the printed output. If you're using PHP 5.3 or lower, you'll have to set this option or Prettier will generate incompatible code. |
167168
| `printWidth` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)) |
168169
| `tabWidth` | `4` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)) |
169170
| `useTabs` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tabs)) |
170171
| `singleQuote` | `false` | If set to `"true"`, strings that use double quotes but do not rely on the features they add, will be reformatted. Example: `"foo" -> 'foo'`, `"foo $bar" -> "foo $bar"`. |
171-
| `trailingCommaPHP` | `"none"` | If set to `"all"`, trailing commas will be added wherever possible. <br> If set to `"php7.3"`, trailing commas will be added to multiline arrays, lists, uses and function calls. <br> If set to `"php7.2"`, trailing commas will be added to multiline arrays, lists and uses. <br> If set to `"php5"`, trailing commas will be added to multiline arrays and lists. <br> if set to `"none"`, no trailing commas. |
172+
| `trailingCommaPHP` | `"all"` | If set to `"all"`, trailing commas will be added wherever possible. <br> If set to `"none"`, no trailing commas are printed. |
172173
| `braceStyle` | `"psr-2"` | If set to `"psr-2"`, prettier will move open brace for code blocks (classes, functions and methods) onto new line. <br> If set to `"1tbs"`, prettier will move open brace for code blocks (classes, functions and methods) onto same line. |
173174
| `requirePragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)) |
174175
| `insertPragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#insert-pragma)) |

src/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
since: "0.13.0",
88
category: CATEGORY_PHP,
99
type: "choice",
10-
default: "7.1",
10+
default: "5.4",
1111
description: "Minimum target PHP version.",
1212
choices: [
1313
{ value: "5.0" },

0 commit comments

Comments
 (0)