webgriffe/module-config-override 1.0.1

A Magento 2 module that reads from file additional configuration

Type

magento2-module

License

MIT

Requires
Requires (dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Config Override Magento 2 Module

Build Status

A Magento 2 module that overrides default configuration from file which can be added to version control, inspired by this Magento 1.x extension: https://github.com/webgriffe/config-extension.

Installation

Please, use Composer and add webgriffe/module-config-override to your dependencies. Also add this repository to your composer.json.

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/webgriffe/module-config-override.git"
    }
]

Config override

Magento configuration is driven by database. This, sometimes, is overkill and forces us to maintain upgrade script to keep Magento envorinment aligned with features development. So, this extension enables additional config file that overrides database configuration. The file must be at path app/etc/default.yml. For example:

design:
  head:
    default_title: My Store Title
    title_suffix: - My Store Title

Only default configuration scope is overridden.

Overridden config values are shown in backend

Overridden config values are shown in Magento's backend. Every config setting it's shown on its section. For example, if you have the following default.yml file:

design:
  head:
    default_title: Webgriffe Store
    title_suffix: - Webgriffe Store

When you'll go to Stores -> Configuration -> General -> Design you'll find the overridden config value shown and not editable.

Admin Screenshop

This feature improves a lot the usability of this extension.

To Do

  • Improve system config admin interface to support complex fields
  • Environment specific overrides

Credits