Download the PHP package alpaca-sh/magento2-environmentconfig without Composer
On this page you can find all versions of the php package alpaca-sh/magento2-environmentconfig. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alpaca-sh/magento2-environmentconfig
More information about alpaca-sh/magento2-environmentconfig
Files in alpaca-sh/magento2-environmentconfig
Package magento2-environmentconfig
Short Description Apply environment specific configuration for Magento 2 projects
License OSL-3.0
Informations about the package magento2-environmentconfig
Alpaca\EnvironmentConfig
This Magento 2 module aims to be a simple way of applying specific Magento configuration for the current environment, based on YAML or JSON files.
Build upon the semaio/magento2-configimportexport module.
Installation
Install via composer
Enable and install the module
Usage
Configuration folder
Create a new folder in the root of your project (default: .environment
), and add this folder to your .gitignore
.
Next, create one or more files (yaml or json) with your desired configuration.
See File Formats for an extensive overview of the supported file formats, supported by the underlying module semaio/magento2-configimportexport.
Example
Encrypted values
If you need to save encrypted values but prefer to store the decryted value in your yaml or json file you can use the !encryted
prefix.
Apply changes (manually)
Apply changes using the defaults:
- Folder:
.environment
- Format:
yaml
Apply changes with non-default folder name and format
After the changes have been applied, the cache will be cleared automaticly. To skip that you can use the --no-cache
option.
Apply changes (automatically)
The configuration can also be applied automatically when running bin/magento setup:upgrade
.
Add the following configuration to your app/etc/env.php
.
You can override the defaults: