Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add phpVersion option #1286

Merged
merged 5 commits into from
Jan 8, 2020
Merged

Add phpVersion option #1286

merged 5 commits into from
Jan 8, 2020

Conversation

czosel
Copy link
Collaborator

@czosel czosel commented Jan 8, 2020

  • add new option phpVersion
  • trailingCommaPHP
    • depreacte phpX.X options
    • change default to all

Probably it's best to review the commits separately 😉

Based on #1285

@czosel czosel requested a review from loilo January 8, 2020 09:11
Copy link
Collaborator

@loilo loilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, to summarize this:

  • We should consider making trailingCommaPHP a boolean. (Objections?)
  • We should test (and accordingly fix) flexible nowdoc blocks.

Everything else looks fine to me.

EDIT: P.S.:

This does not exactly belong here, but I haven't found a good place to drop this, so you'll get it here:

I have adjusted the playground the other day. For local development, you can now pick a standalone.js file from your system that's then used by the playground. I wanted to have this for a while, mostly for easily accessing the AST (astexplorer.net obviously does not have our version of the parser), but you might find it useful as well. 🙂

Screenshot of the new "Use local plugin file" button

src/options.js Outdated Show resolved Hide resolved
src/printer.js Show resolved Hide resolved
tests/encapsed/encapsed.php Show resolved Hide resolved
tests/trailing_commas/__snapshots__/jsfmt.spec.js.snap Outdated Show resolved Hide resolved
@czosel
Copy link
Collaborator Author

czosel commented Jan 8, 2020

I have adjusted the playground the other day. For local development, you can now pick a standalone.js file from your system that's then used by the playground. I wanted to have this for a while, mostly for easily accessing the AST (astexplorer.net obviously does not have our version of the parser), but you might find it useful as well. slightly_smiling_face

Awesome! 💯 Looking forward to give this a try 🙂

Copy link
Collaborator

@loilo loilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I think we're good to go.

src/options.js Outdated Show resolved Hide resolved
tests/encapsed/encapsed.php Show resolved Hide resolved
@czosel czosel merged commit 49d35c5 into prettier:master Jan 8, 2020
@czosel czosel deleted the phpversion-2 branch January 8, 2020 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants