Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HHVM Composer Plugin for Debian Based Systems
Composer is a commonly used dependency manager for PHP projects and packages. In order to make creation and distribution of HHVM projects as simple as possible we created a plugin that will install dynamic HHVM extensions locally in your project for you. It can be found here
Setup (for package users)
Make sure you have read the tutorial on how to use Composer, which can be found here
List any extension you require in the json schema the same way you would for any other php dependency, see an example
hhvm-dev-nightlypackages or a source build on your machine. (The latest release does not contain some important features needed by the package)
hhvm composer updateor
hhvm composer installas you normally would and follow the instructions on the screen. If the build was successful you should see all the extensions you required in the
vendor/ext/directory of you project.
Finally, you can now run
hhvm -c <path-to-project>/vendor/ext/extensions.ini <path-to-project>/<your-main-file>.php to run your project. If you need to configure your extension with specific build options you can pass the options in through the config property with the under the "ext-options" flag.
Setup (for extension managers)
Make sure your project supports installation via the standard
Create a composer.json file that lists "hhvm/debian-composer-plugin" as a requirement, see this example. The easiest way to do this is with
hhvm composer init. Make sure you list the type of the extension as "extension". Then add any Debian packages required by your extension the extras property in the json. The name you use for Distro specific extensions should be the same as the name given by
lsb_release -i --shortand the release name for the any release specific packages should be under the name given by
lsb_release -r --short.
Upload your extension on packagist.