3 ms·
PHP Static Analysis with HHVM and Hussar
- caipre 12y agoAuthor here. The project is on github if you want to skip the blog post: https://github.com/wayfair/hussar https://github.com/wayfair/hussar Happy to answer any questions!
- 0x0 12y agoVery cool, have you tried running it against popular open source projects like wordpress or symfony?
- caipre 12y agoGood suggestion, I've not tried that yet! I'll see about doing that tomorrow. I believe both of those are able to run on HHVM already, so I'd be curious to see what hussar finds.
- caipre 12y agoHere is a first pass over the Wordpress repository: https://gist.github.com/caipre/feb7f9fe46dc2fa90a79 https://gist.github.com/caipre/feb7f9fe46dc2fa90a79 Unfortunately, analyzing symphony caused an HHVM segfault. =( I'm not sure it's the same issue, but this happened to me before: https://github.com/facebook/hhvm/issues/4363 https://github.com/facebook/hhvm/issues/4363 This was a good exercise: I was happy to see that hussar adapts pretty easily to outside projects. Basically, I ended up doing this: $ git clone git@github.com:Wordpress/Wordpress.git $ cd Wordpress $ ~/hussar/bin/make-report There were one or two hiccups that required some manual changes to the scripts; I'll get fixes for these up soon.
- 0x0 12y agoThat's super interesting and useful. I wonder if any of those issues are real problems in wp. Going to check out this stuff more closely as soon as I find some free time :)
- allan_s 12y agoShameless plug but currently there's one bug in the postgresql driver for HHVM preventing me from switching our companies projects to HHVM https://github.com/PocketRent/hhvm-pgsql/issues/52 https://github.com/PocketRent/hhvm-pgsql/issues/52 if any charitable mind feel like giving me an hand, I know C++ but I don't know where to apply the fix they are talking about.