Chris Seufert
Chris Seufert
@czosel do you have any time to play with this, and see if you can get a more consistent output for match cases? I am unsure why the groups are...
I have encountered this too, I think it will need to be fixed in the parser.
We could apply for formatting of a list, but its not pretty ```php
I have a prelimiary patch for this, but struggling to get the line breaking to behave however for your case we get the following: https://github.com/prettier/plugin-php/blob/5d9ff96626c45b6088dbc5efd61c69588c756b24/tests/match/__snapshots__/jsfmt.spec.js.snap#L100-L127 see PR #2003
Yer, haven't managed to get prettier to actually work doing that, and I'm not sure why it doesn't format that way
It is probably time to upgrade to more modern prettier and drop support for older nodejs versions. I tried this somewhat recently, and there is a lot to fix, this...
I dont think this is a pretter problem, it works on the playground: https://loilo.github.io/prettier-php-playground/#N4IgDgTgpgLjCWUIHkwIPYDsDOIBcok8mMA6vACYwAW+AHAAwA0IMAhgEblW14AsLAK7YoAFU648AMzYAbES2zEA5rKgBFQehhR8M+VBZhqYAGpIlWfCACsAOj4gWMCG3iyVAYXQBbH2wAFAAkA-BdBQxAOVwBjKABlGABPNWswbAgAWgAmJxBoAEdBeGgA12V-PTkFEGIRCBgytgq2KoMAXxYoCngYdBQ0eCxJUDZsGDaRTtrMMEEJvBAAHgB+YzAAHUxMNh8obDA2OIACNjBNjYooADcoWXQLn3Qr2QBuLeEoY5piAGsNjYAWWed3emE+32ofwBTxeAJiWDiEEwAPi6CkMAAIndYFAwTFZGNsMcAILnbDxAqyABiiFkFGOUAAHjpMBRicC4ZhgFt2iB2kA I think the problem will be to do with using an incompatible prettier version. this plugin...
Yes, it appears the closure is being unwrapped at some point. Simpler example ``` $a = (fn() => 0)(1); ``` becomes ``` $a = fn() => 0(1); ``` This could...
My attempt at a fix for this is in #1764
@czosel Hrmm looks like the parser is doing kinda weird things parsing these. Looks to me like the trailing comment is not being picked up on the first line correctly...