I am building a test application on Openshift using the Nginx HHVM 3.13.1, MySQL 5.5 and phpMyAdmin 4.0 cartridges. This is a working application that I have running locally in a vagrant box that uses Composer and has a dependency on Facebook's xhp-lib. This is my current composer.json
{
"require":
{
"php": ">5.4.0",
"hhvm": ">=3.6.6",
"facebook/xhp-lib": "2.x",
"nikic/fast-route": "dev-master"
}
}
There are two problems - first, my PHP version isn't current enough, and second, I can't run composer install using the HHVM daemon like so
hhvm composer install
and as a result, all of the dependencies fail with a message saying 'you are running this with PHP and not HHVM' if I explicitly use 'composer install' as the command, and 'hhvm: command not found' if I actually try to run it with hhvm.
This is the post-deploy hook that i'm using, as you can see it literally just tries to download and install composer:
#!/bin/bash
export MY_PHPCOMPOSER=$OPENSHIFT_DATA_DIR/composer.phar
# if composer not exists, download
if [ ! -f $MY_PHPCOMPOSER ]; then
cd $OPENSHIFT_DATA_DIR
echo "Downloading composer..."
curl -s https://getcomposer.org/installer | php -- --install- dir=$OPENSHIFT_DATA_DIR
fi
$MY_PHPCOMPOSER -n -q self-update
cd $OPENSHIFT_REPO_DIR
# install
$MY_PHPCOMPOSER install
So here are my questions: How can I run composer under hhvm in openshift so I can use XHP, and How do I upgrade my PHP version in openshift?