PHPackages                             alpaca-sh/magento2-environmentconfig - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alpaca-sh/magento2-environmentconfig

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

alpaca-sh/magento2-environmentconfig
====================================

Apply environment specific configuration for Magento 2 projects

0.2.0(3y ago)09.0k↓79.5%[1 PRs](https://github.com/alpacash/magento2-environmentconfig/pulls)OSL-3.0PHP

Since Jun 25Pushed 3y ago2 watchersCompare

[ Source](https://github.com/alpacash/magento2-environmentconfig)[ Packagist](https://packagist.org/packages/alpaca-sh/magento2-environmentconfig)[ RSS](/packages/alpaca-sh-magento2-environmentconfig/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

Alpaca\\EnvironmentConfig
=========================

[](#alpacaenvironmentconfig)

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](https://github.com/semaio/Magento2-ConfigImportExport) module.

Installation
------------

[](#installation)

**Install via composer**

```
composer require alpaca-sh/magento2-environmentconfig
```

**Enable and install the module**

```
php bin/magento module:enable Alpaca_EnvironmentConfig
php bin/magento setup:upgrade
```

Usage
-----

[](#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](https://github.com/semaio/Magento2-ConfigImportExport/blob/develop/docs/file-formats.md) for an extensive overview of the supported file formats, supported by the underlying module [semaio/magento2-configimportexport](https://github.com/semaio/Magento2-ConfigImportExport).

#### Example

[](#example)

```
# .environment/web.yaml

web/unsecure/base_url:
  default:
    0: 'http://magento-app.com/'
web/secure/base_url:
  default:
    0: 'https://magento-app.com/'

```

**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.

```
service/api/key:
  default:
    0: '!encrypted supersecretapikey'

```

**Apply changes (manually)**

Apply changes using the defaults:

- Folder: `.environment`
- Format: `yaml`

```
bin/magento environment:config:process

```

Apply changes with non-default folder name and format

```
bin/magento environment:config:process --folder  --format json

```

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`.

```
'environment_config' => [
    'auto_update' => [
        'enabled' => true
    ]
]

```

You can override the defaults:

```
'environment_config' => [
    'auto_update' => [
        'enabled' => true,
        'directory' => '.environment',
        'format' => 'yaml'
    ]
]

```

Licence
-------

[](#licence)

[Open Software License (OSL 3.0)](http://opensource.org/licenses/osl-3.0.php)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~327 days

Total

2

Last Release

1454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b34a0d1e14092bc939304c55a1f799c05ee94ff401d3155dda3ba7f976b8e3e5?d=identicon)[Bogardo](/maintainers/Bogardo)

---

Top Contributors

[![Bogardo](https://avatars.githubusercontent.com/u/388557?v=4)](https://github.com/Bogardo "Bogardo (3 commits)")[![imadphp](https://avatars.githubusercontent.com/u/33043295?v=4)](https://github.com/imadphp "imadphp (2 commits)")

### Embed Badge

![Health badge](/badges/alpaca-sh-magento2-environmentconfig/health.svg)

```
[![Health](https://phpackages.com/badges/alpaca-sh-magento2-environmentconfig/health.svg)](https://phpackages.com/packages/alpaca-sh-magento2-environmentconfig)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
