There's only three steps required to make Koken 0.15.0 work on HHVM:
-
Koken's plugin support depends on the output of
get_declared_classes()
matching the order the that classes were defined - which can't be guaranteed. The best solution for this would be to ensure plugins were named the same as their classes, but until they do, this patch parses the plugin for the class name: https://gist.github.com/hcooper/a978a1328da787deb390 -
In
i.php
Koken hard-codes aContent-Length
header, which causes requests to hang when responses are gzip'ed, (as declared length != actual length). In this diff we just removed the header and let the webserver decided what to do instead (i.e. in most cases return chunked-content rather than set length): https://gist.github.com/hcooper/a1c7a882914679a0ccc9 -
BONUS - switch Koken from using ImageMagick to GD instead (GD support is built into HHVM): https://gist.github.com/hcooper/081bc779d374eefa7293