Skip to main content
Version: V6.2

PHP Project Deployment

Overview

The platform defaults to recognizing PHP projects based on the presence of an index.php file or composer.json in the root directory of the source code.

Shell Hook Support

Configure composer.json to call shell hooks

{
"scripts": {
"pre-install-cmd": ["bash ./pre-install-cmd.sh"],
"post-install-cmd": ["bash ./post-install-cmd.sh"]
},
"require": {
"php": "7.1.21",
"ext-memcached": "*"
}
}

The content defined in pre-install-cmd will be executed before install, and the content defined in post-install-cmd will be executed after install. The defined scripts must be created in advance and given execute permissions

Composer Files

By default, the composer.json and composer.lock files must exist in the root directory of the source code.composer.lock can be generated with the following command

composer update --ignore-platform-reqs

Extension Support

PHP 5.6

The following built-in extensions are automatically enabled on Rainbond (this list does not include extensions enabled by default in PHP, such as DOM, JSON, PCRE, or PDO):

The following built-in extensions have been built as "shared" and can be enabled via composer.json (the internal identifier name is given in parentheses):

The following third-party extensions can be enabled via composer.json (the internal identifier name is given in parentheses):

PHP 7.0

The following built-in extensions are automatically enabled on Rainbond (this list does not include extensions enabled by default in PHP, such as DOM, JSON, PCRE, or PDO):

The following built-in extensions have been built as "shared" and can be enabled via composer.json (internal identifier names given in parentheses):

The following third-party extensions can be enabled via composer.json (internal identifier names given in parentheses):

PHP 7.1

The following built-in extensions are automatically enabled on Rainbond (this list does not include extensions enabled by default in PHP, such as DOM, JSON, PCRE or PDO):

The following built-in extensions have been built as "shared" and can be enabled via composer.json (internal identifier names given in parentheses):

The following third-party extensions can be enabled via composer.json (the internal identifier name is given in parentheses):

Deployment example

Go to the team, create a new application and select the source code example for construction, select PHP Demo and default all the next steps.