Configuring PHP
PHP configuration is stored within the cma.js
file:
Changing the PHP version
PHP to Magento version mapping will look like this:
Note that we are changing both baseImage and debugImage properties!
After changing the configuration, restart the app to install the new PHP version:
And validate the new PHP installation through the CLI:
Also, the PHP version will be printed during start
command execution:
Installing PHP extensions
By default, only the extensions that are required by Magento are installed. If you need to install any additional extensions, cma.js will have to be changed accordingly:
All of this might look complicated, but this object describes the following information for magento-scripts:
PHP Extension name. Defined in
configuration.php.extensions
as a key for configuration object.Dependencies required by the extension. Defined in
configuration.php.extensions[name].dependencies
as an array of strings. Optional.Command to install the extension inside the project image. Defined in
configuration.php.extensions[name].command
as a string or as a synchronous function that returns a string or asynchronous function that returns a string. Optional.
Enabling installed extension
Removing build dependencies to save space inside the project image.
After you made your changes restart the app for changes to take effect:
And validate newly installed extensions through the CLI:
Last updated
Was this helpful?