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

Support 7.2 #83

Closed
3 tasks done
ichiriac opened this issue Jul 30, 2017 · 10 comments
Closed
3 tasks done

Support 7.2 #83

ichiriac opened this issue Jul 30, 2017 · 10 comments

Comments

@ichiriac
Copy link
Member

ichiriac commented Jul 30, 2017

@ichiriac ichiriac added this to the 2.1.0 milestone Jul 30, 2017
@ichiriac ichiriac self-assigned this Jul 30, 2017
@ichiriac ichiriac modified the milestones: 2.1.0, 2.2.0 Nov 1, 2017
@ichiriac ichiriac modified the milestones: 2.2.0, 3.0.0 Dec 28, 2017
@alexander-akait
Copy link
Collaborator

@ichiriac friendly ping, can we add priority to Short list syntax? Many people move to 7.1 as minimum required version

@ichiriac
Copy link
Member Author

hi @evilebottnawi, if I'm remember well, short list syntax was already implemented & released from another issue. I'll take a look son in order to publish a new release

@alexander-akait
Copy link
Collaborator

@ichiriac not fully, example [,,$c,,$e,,] = $array

@ichiriac
Copy link
Member Author

@evilebottnawi, ok I'll find some time this weekend to close some issues and make a release

@ichiriac
Copy link
Member Author

Hi @evilebottnawi,

It's corrected, and should work in every cases, BUT this release will break backward compatibility :

I've introduced a shortForm property on list node, before we used àrray nodes for that. Also I've rewrote the arrays parsing to stick with the PHP implementation, and by doing this I've simplified the array AST node items.

It will be released on 3.0.0-alpha4 as the AST structure is not yet fully stable, still remains little bugfixes on edge cases to fix on this.

@alexander-akait
Copy link
Collaborator

@ichiriac thanks for work

@ichiriac
Copy link
Member Author

ichiriac commented Aug 1, 2018

Hi @evilebottnawi, it's not finished, I don't like at all how short arrays are handled. The problem here is that the grammar on PHP 7.1 is permissive and they use the same node for vars deferencing and short arrays. They do a second pass at the bytecode generation to manage grammar logic but I need to do both on a single pass.

I'll start my vacations in 2 weeks, I'll work on a serious release then.

@alexander-akait
Copy link
Collaborator

@ichiriac It is good news 👍 We have already done a serious job with prettier-php. Perhaps in the near future we will officially release stable version, will be great support all php 7.2 features.

@ichiriac
Copy link
Member Author

PHP 7.2 is ready

Remains just an edge case : it's too permissive on array syntax $a = [,,$foo,,]; - I'll let it like this because it would consume CPU to handle this after parsing the array.

@ichiriac
Copy link
Member Author

This fix is now relased under 3.0.0-alpha.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants