2017 © Pedro Peláez
 

magento2-module magento2-configimportexport

Import/Export core_config_data values in Magento 2

image

semaio/magento2-configimportexport

Import/Export core_config_data values in Magento 2

  • Tuesday, July 3, 2018
  • by therouv
  • Repository
  • 14 Watchers
  • 82 Stars
  • 20,264 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 19 Forks
  • 8 Open issues
  • 10 Versions
  • 14 % Grown

The README.md

ConfigImportExport

This extension provides CLI commands for Magento 2 to import/export system configuration data., (*1)

Why this extension?

While Magento 2 offers the app:config:dump / app:config:import commands, they're limited to one environment and a little bit hard to manage, especially in CI/CD setups., (*2)

This extension supports managing configuration values for multiple environments (production, staging, etc.) out-of-the-box, defining and overwriting base configuration values in a specific environment. It also allows different file formats (e.g., YAML, JSON). In general, it makes that process a bit more streamlined and easier to manage, with the added benefit of generalization and cross-compatibility with other agencies/merchants using this., (*3)

Installation

Add the package to your composer.json, (*4)

composer require semaio/magento2-configimportexport

Enable and install the module, (*5)

php bin/magento module:enable Semaio_ConfigImportExport
php bin/magento setup:upgrade

Facts

  • Supported Magento versions are 2.3 and 2.4.
  • Supported PHP versions are 7.2, 7.3, 7.4, and 8.1.

Functionality

This module is a work in progress and will be extended in the future with more functionality and support for other file formats., (*6)

File formats

This module currently supports the following file formats:, (*7)

  • YAML (default)
  • JSON

See docs/file-formats.md for more information and examples., (*8)

Import config data

See docs/config-import.md for more information., (*9)

Export config data

See docs/config-export.md for more information., (*10)

Usage with Deployer

When using a push approach in CI/CD, the environment variables should be replaced on the runner and not on the initiating host or target host. For this, you can use this Deployer task to do this and import the config settings;, (*11)

task('magento:config:set', function () {
    $resolver = new \Semaio\ConfigImportExport\Model\Resolver\EnvironmentVariableResolver();
    $glob = glob('config/store/**/*.yaml');
    array_walk($glob, function ($file) use ($resolver) {
        if (file_put_contents($tempFile = tempnam('/tmp', get('clientslug')), $resolver->resolveValue(file_get_contents($file)))) {
            upload($tempFile, get('release_path') . '/' . $file);
        }
    });
    run('{{bin/php}} {{release_path}}/bin/magento config:data:import {{release_path}}/config/store ' . get('environment'));
});

Support

If you encounter any problems or bugs, please create an issue on GitHub., (*12)

Contribution

Any contribution to the development of MageSetup is highly welcome. The best possibility to provide any code is to open a pull request on GitHub., (*13)

Licence

Open Software License (OSL 3.0), (*14)

Contributors

Thanks to all contributors who invested their valuable time to contribute to this module. Much appreciated!, (*15)

Inspiration

This module is inspired by the awesome n98-magerun plugin "HarrisStreet ImpEx" by @SchumacherFM for Magento 1 which you can find here., (*16)

(c) 2016-2022 semaio GmbH / Rouven Alexander Rieker, (*17)

The Versions

03/07 2018

dev-develop

dev-develop

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php 7.0.2|7.0.4|~7.0.6|~7.1.0
  • magento/module-config ~101.0.0
  • magento/module-store ~100.2.0
  • magento/framework ~101.0.0
  • symfony/yaml ~2.0|~3.0

 

The Development Requires

27/11 2017

dev-master

9999999-dev

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • symfony/yaml ~2.0
  • php 7.0.2|7.0.4|~7.0.6|~7.1.0
  • magento/module-config ~101.0.0
  • magento/module-store ~100.2.0
  • magento/framework ~101.0.0

 

The Development Requires

27/11 2017

3.0.0

3.0.0.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php 7.0.2|7.0.4|~7.0.6|~7.1.0
  • symfony/yaml ~2.0
  • magento/module-config ~101.0.0
  • magento/module-store ~100.2.0
  • magento/framework ~101.0.0

 

The Development Requires

04/05 2017

2.2.2

2.2.2.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *

 

18/04 2017

2.2.1

2.2.1.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *

 

21/11 2016

2.2.0

2.2.0.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *

 

24/10 2016

2.1.2

2.1.2.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *

 

02/08 2016

2.1.1

2.1.1.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *

 

31/07 2016

2.1.0

2.1.0.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *

 

01/04 2016

2.0.0

2.0.0.0

Import/Export core_config_data values in Magento 2

  Sources   Download

OSL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • symfony/yaml ~2.0
  • magento/module-config *
  • magento/module-store *
  • magento/framework *