PHPackages                             dmstr/yii2-yaml-converter-command - 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. dmstr/yii2-yaml-converter-command

AbandonedYii2-extension[Utility &amp; Helpers](/categories/utility)

dmstr/yii2-yaml-converter-command
=================================

Converts and merges YAML files based on YAML rules

0.3.1(10y ago)25.5kBSD-3-ClausePHP

Since Apr 14Pushed 8y ago3 watchersCompare

[ Source](https://github.com/schmunk42/yii2-yaml-converter-command)[ Packagist](https://packagist.org/packages/dmstr/yii2-yaml-converter-command)[ RSS](/packages/dmstr-yii2-yaml-converter-command/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (9)Used By (0)

YAML Converter Extension for Yii 2.0 Framework
==============================================

[](#yaml-converter-extension-for-yii-20-framework)

---

🚨 **THIS REPOSITORY IS DEPRECATED**

---

TL;dr
-----

[](#tldr)

This is a console command to convert and merges YAML files.

This project was developed as a helper-tool for our Docker development and build process and may be currently in a heavily biased state.

> Note you can run this command directly with `docker`, since it's part of [Phundament](https://github.com/phundament/app). See below for details.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist dmstr/yii2-yaml-converter-command "*"

```

to the require section of your `composer.json` file.

Register a converter command in console configuration

```
'controllerMap' => [
	'stack-converter' => 'dmstr\console\controllers\DockerStackConverterController'
],

```

Usage
-----

[](#usage)

### Within a Yii 2.0 application

[](#within-a-yii-20-application)

Once the extension is installed, use it on the command line:

```
./yii yaml/convert-docker-compose \
    --dockerComposeFile=@app/docker-compose.yml \
    --templateDirectory=@app/build/stacks-tpl \
    --outputDirectory=@app

```

Alternative alias

```
./yii yaml/convert-docker-compose \
    --dockerComposeFile=@root/docker-compose.yml \
    --templateDirectory=@root/build/stacks-tpl \
    --outputDirectory=@root

```

### Via Docker image

[](#via-docker-image)

You can run the converter for Docker stacks directly with Docker, from the `phundament/app` Docker image

```
docker run phundament/app ./yii help yaml/convert-docker-compose

```

After checking the options, we may mount i.e. `tests` to `/mnt` in the container and run the conversion process

```
docker run -v `pwd`/tests:/mnt phundament/app ./yii yaml/convert-docker-compose \
    --dockerComposeFile=/mnt/base.yml \
    --templateDirectory=/mnt/stacks-tpl \
    --templateReplacementsFile=/mnt/eny.yml \
    --outputDirectory=/mnt/stacks-gen

```

> Hint! You can check the installed version with `docker run phundament/app composer show -i dmstr/yii2-yaml-converter-command`

How it works?
-------------

[](#how-it-works)

### `docker-compose` converter

[](#docker-compose-converter)

The conversion process follows the following simple ruleset

- read `dockerComposeFile` as new *base-file*
- find `*.tpl.yml` files in `templateDirectory`
- read `templateReplacementsFile` and replace values in every template
- apply `.variable` rules (like `CLEAN`)
- merge template with *base-file* and write new file to `outputDirectory`
- if there's a subfolder with the same name as the template, recurse into that folder and repeat the process with the new file, just created in the last step

> You can use `.image: CLEAN` to remove the `image` attribute of a service.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~9 days

Total

8

Last Release

3990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (43 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/dmstr-yii2-yaml-converter-command/health.svg)

```
[![Health](https://phpackages.com/badges/dmstr-yii2-yaml-converter-command/health.svg)](https://phpackages.com/packages/dmstr-yii2-yaml-converter-command)
```

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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