I have a ZF2 app that only has console routes that I would like to package as a PHAR but I've only seen *web* apps packaged like this, not CLI apps. When I attempt to use the examples in the PHP docs <http://php.net/manual/en/phar.buildfromdirectory.php> I get an error when ZF2 tries to do a chdir() which incidentally happens right at the beginning of public/index.php. I tried including the files in my phar both from a directory and from an iterator.
Warning: chdir(): No such file or directory (errno 2) in phar:///Users/dev/Sites/test/project.phar/public/index.php on line 6 Is packaging a ZF2 CLI app like this possible? If so, could anyone point me in the right direction? Thanks. Julian.