-
Notifications
You must be signed in to change notification settings - Fork 3k
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
-
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
-
Install
hhvm-nightly
andhhvm-dev-nightly
packages or a source build on your machine. (The latest release does not contain some important features needed by the package) -
Run
hhvm composer update
orhhvm composer install
as you normally would and follow the instructions on the screen. If the build was successful you should see all the extensions you required in thevendor/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.
-
Make sure your project supports installation via the standard
hphpize
system. -
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-debian". 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 bylsb_release -i --short
and the release name for the any release specific packages should be under the name given bylsb_release -r --short
. -
Upload your extension on packagist.