Semaphore supports the following PHP versions via phpbrew:
The Semaphore stack includes:
List of all packages and versions is available on the supported application stack page.
The major version specified in project settings will be set as global to the latest corresponding version. Semaphore uses phpbrew for managing PHP versions.
Setting a PHP version is performed by the equivalent of the following command:
phpbrew switch php-7.0
The examples below illustrate how PHP can be configured with build commands.
To set a different timezone you can use a build command like below which changes the timezone from UTC to America/Denver. We're using | as a delimiter in sed to avoid escaping the forward slash in the timezone.
phpbrew cd etc && sed -i "s|date.timezone = UTC|date.timezone = 'America/Denver'|" php.ini && cd -
To increase the default memory limit for the PHP add a setup command similar to the following.
phpbrew cd etc && sed -i "s/memory_limit = 128M/memory_limit = 256M/" php.ini && cd -
To use your custom php.ini file include it in Project Settings > Configuration Files and add the line below as a build command. In this case, the configuration file is called custom_php.ini.
phpbrew cd etc && cp /home/runner/custom_php.ini php.ini && cd -
Semaphore Docs are open source — Edit on GitHub