PHPackages                             rozehnal/environment-parameters - 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. rozehnal/environment-parameters

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rozehnal/environment-parameters
===============================

Composer script building your detached parameters for deploying the app. Built above the great incenteev/composer-parameter-handler library.

v0.81(9y ago)03.6kMITPHPPHP &gt;=5.3.3

Since Mar 7Pushed 6y ago2 watchersCompare

[ Source](https://github.com/rozehnal/environment-parameters)[ Packagist](https://packagist.org/packages/rozehnal/environment-parameters)[ Docs](https://github.com/rozehnal/environment-parameters)[ RSS](/packages/rozehnal-environment-parameters/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (6)Versions (2)Used By (0)

Composer script building your detached parameters for deploying your app
========================================================================

[](#composer-script-building-your-detached-parameters-for-deploying-your-app)

This tool allows you to manage app parameters for deployment in separate repositories. The repo is fully compatible with all parameters from .

[![Build Status](https://camo.githubusercontent.com/a31415ce2d57b2e3cd56c7d1ae5fe704cd6d02fe70dfd36d949fdbfd71ae8c79/68747470733a2f2f7472617669732d63692e6f72672f726f7a65686e616c2f656e7669726f6e6d656e742d706172616d65746572732e706e67)](https://travis-ci.org/rozehnal/environment-parameters)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6f7edb3fc30b09b0581f5b54e98d5fe163a9477296fea051d4620923627a2d51/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f7a65686e616c2f656e7669726f6e6d656e742d706172616d65746572732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rozehnal/environment-parameters/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/eddd6bf4b9821800a49b72bca28d1e6685077df9aff395a8ba332cd1d84df5a0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f7a65686e616c2f656e7669726f6e6d656e742d706172616d65746572732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rozehnal/environment-parameters/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/0dd9a0b5318a2439590f8184f05f6a85f6f71f1430ae435e3e0cbf4470bed06b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36653338393061632d363433362d343136362d616664342d6638376430383965313737342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/6e3890ac-6436-4166-afd4-f87d089e1774)[![Latest Unstable Version](https://camo.githubusercontent.com/1c50c8c4a71232e7a3a5b16e0ed79c5bad9e8c96525337a29bf0d621e2c1339f/68747470733a2f2f706f7365722e707567782e6f72672f726f7a65686e616c2f656e7669726f6e6d656e742d706172616d65746572732f762f756e737461626c652e706e67)](https://packagist.org/packages/rozehnal/environment-parameters/)[![Latest Stable Version](https://camo.githubusercontent.com/4c59af3b94ba5c431cef3a787ab5cef469a97444219e87af9391e17e3a1840ec/68747470733a2f2f706f7365722e707567782e6f72672f726f7a65686e616c2f656e7669726f6e6d656e742d706172616d65746572732f762f737461626c65)](https://packagist.org/packages/rozehnal/environment-parameters)

Run
---

[](#run)

`composer run-script build --no-interaction -- --env=prod`

Usage
-----

[](#usage)

Add the following in your root composer.json file:

```
{
    "require": {
        "rozehnal/environment-parameters": "0.x-dev"
    },
    "scripts": {
       "build": [
             "Paro\\EnvironmentParameters\\ParametersHandler::buildParameters"
           ]
    },
    "extra": {
        "environment-parameters": {
          "build-folder": "build",
          "files": [
			{
			  "file": "{env}/key.{env}.p12",
			  "name": "key.p12"
			}
          ],
          "incenteev-parameters": {
            "file": "parameters.yml",
            "env-map": {
              "path": "PATH"
            }
          }
        }
      }
}
```

The `build/parameters.yml` will then be created composer script, to match the structure of the dist file `parameters.yml`by asking you the missing parameters.

Supported syntax
----------------

[](#supported-syntax)

- Fully compatible with
- `"%env(ENV_VARIABLE)%"` syntax in `*.yml` files
- `imports` in `*.yml` files

```
 imports:
     - { resource: 'include.yml' }

```

Hierarchical structure
----------------------

[](#hierarchical-structure)

```
{
    "extra": {
        "environment-parameters": {
          "files": [
			{
			  "file": "{env}/key.p12",
			  "name": "key.p12"
			}
          ],
          "incenteev-parameters": {
            "file": "{env}/parameters.yml"
          }
        }
    }
}
```

`composer run-script build --no-interaction -- --env=test/test01`

Files are searched in order `test/test01/key.p12`, `test/key.p12`and `test/test01/parameters.yml`, `test/parameters.yml`. It means you are able to build configuration on inheritence from parent folders with overriding details in children folders. Applicable for both - files and `*.yml` files.

Output formats \[yaml, php-constants\]
--------------------------------------

[](#output-formats-yaml-php-constants)

Default output format is well-known`yaml` file. Currently there is possible to create `php`file where each parameter defines constant - `define(key, value)`.

```
{
    "extra": {
        "environment-parameters": {
          "incenteev-parameters": {
            "file": "{env}/parameters.yml",
            "name": "parameters.php",
            "output-format": "php-constants"
          }
        }
    }
}
```

Example
-------

[](#example)

Todo
----

[](#todo)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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 ~10 days

Total

2

Last Release

3385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/929915061933bfb9948dcef6044da6eed50143338b7a9b0410cb682582ad88e1?d=identicon)[rozehnal](/maintainers/rozehnal)

---

Top Contributors

[![rozehnal](https://avatars.githubusercontent.com/u/6944808?v=4)](https://github.com/rozehnal "rozehnal (40 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

configurationparameters managementenvironment management

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rozehnal-environment-parameters/health.svg)

```
[![Health](https://phpackages.com/badges/rozehnal-environment-parameters/health.svg)](https://phpackages.com/packages/rozehnal-environment-parameters)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k16.6k1](/packages/phpactor-phpactor)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

318117.1k1](/packages/cognesy-instructor-php)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)

PHPackages © 2026

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