espressobytes / mergeconfigfiles
Merge Config Files for Magento 2
Installs: 1 302
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento2-module
This package is auto-updated.
Last update: 2024-05-23 19:32:21 UTC
README
Introduction
This module has the purpose to merge two config-files (in the form of config.php) to a new config-file
Installation
Installation via composer
composer require espressobytes/mergeconfigfiles
Usage
In Magento-Root, use:
bin/magento config-merge:merge-files <input config file 1> <input config file 2> <output config file> [<output config file> Default: app/etc/]
Example:
bin/magento config-merge:merge-files config.php config_build_addons.php config_buildsystem.php
Integration within deployment of Magento 2
To use this command within the deployment of Magento, the default command list has to be modified. You can do that via composer-patches:
In your `composer.json add (example):
...
"extra": {
"patches": {
"magento/magento2-base": {
"Add new Command to CommandList": "patches/composer/magento2base_add_command.patch"
},
Following this example, you have to have a new patch-file in the folder patches/composer
named magento2base_add_command.patch
.
Add this content to that file:
Index: a/setup/src/Magento/Setup/Console/CommandList.php
<+>UTF-8
===================================================================
--- a/setup/src/Magento/Setup/Console/CommandList.php
+++ a/setup/src/Magento/Setup/Console/CommandList.php
@@ -74,7 +74,8 @@
\Magento\Setup\Console\Command\RollbackCommand::class,
\Magento\Setup\Console\Command\UpgradeCommand::class,
\Magento\Setup\Console\Command\UninstallCommand::class,
- \Magento\Setup\Console\Command\DeployStaticContentCommand::class
+ \Magento\Setup\Console\Command\DeployStaticContentCommand::class,
+ \Espressobytes\MergeConfigFiles\Command\MergeConfigFilesCommand::class
];
}