-
Notifications
You must be signed in to change notification settings - Fork 24
Upgrade PhpParser to support php 7 #139
Conversation
|
I want to do some QA to feel more confident about it, but I currently feel "pretty confident" about it, going based on
Re: your other question
Not really, no. Agreed it seems unrelated. Ashley pointed out shortly before I left the office that there were more OSS OOM error examples than I realized, and this one jumped out as having a lot of parsing error output and also an OOM error. It might be the case that even with the parser upgrade that phan will still have an OOM error and the parser errors were a red herring. I'm not sure yet. |
|
Btw, I added a test exercising some php 7 code, which passes, and would fail without the upgrade (https://circleci.com/gh/codeclimate/codeclimate-duplication/545) |
My bet would be that enough files were still parsing successfully to grow memory usage and cause OOM errors. So this fix might make them happen faster 😄 . |
|
Code LGTM. |
|
👏 Curious about how our phan test repo runs on with this change. |
This library has a handy upgrade guide here: https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-2.0.md Seems there's just one backwards-incompatible change for our wrapper code. I'd like to get this into the next release before we release the OOM fixes. Some php repos are using newer syntax and each file fails to parse, and then it hits an OOM memory that users aren't seeing. Example: https://codeclimate.com/github/etsy/phan/builds/277 Would like to verify on our phan fork on the beta channel that this will work.
d43c71f to
88184da
Compare
|
OK we're taking bets now 😄 Just pushed this change to the |
|
I tested 2 more php 5 repos and they continue to be analyzed correctly, so I'm going to go ahead and ship this. |
This library has a handy upgrade guide here:
https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-2.0.md
Seems there's just one backwards-incompatible change for our wrapper
code.
I'd like to get this into the next release before we release the OOM
fixes. Some php repos are using newer syntax and each file fails to
parse, and then it hits an OOM memory that users aren't seeing.
Example: https://codeclimate.com/github/etsy/phan/builds/277
Would like to verify on our phan fork on the beta channel that this will
work.
@codeclimate/review @ABaldwinHunter