PHPackages                             jc-it/yii2-env-sync - 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. jc-it/yii2-env-sync

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

jc-it/yii2-env-sync
===================

A Yii2 module that helps sync your dev environment settings between devices..

v1.3.0(2mo ago)041MITPHPPHP &gt;=8.2

Since Jun 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/JC-IT/yii2-env-sync)[ Packagist](https://packagist.org/packages/jc-it/yii2-env-sync)[ RSS](/packages/jc-it-yii2-env-sync/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (28)Versions (6)Used By (0)

Yii2 Environment sync
=====================

[](#yii2-environment-sync)

[![codecov](https://camo.githubusercontent.com/619045d32359a90ed8de942a60098f13dcb6cbd7b67a6ecf0fd38e3683c0b870/68747470733a2f2f636f6465636f762e696f2f67682f6a632d69742f796969322d656e762d73796e632f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/jc-it/yii2-env-sync)[![Continous integration](https://github.com/jc-it/yii2-env-sync/actions/workflows/ci.yaml/badge.svg)](https://github.com/jc-it/yii2-env-sync/actions/workflows/ci.yaml)[![Packagist Total Downloads](https://camo.githubusercontent.com/56d4f8080e72a7accb13355e0ce76aa6bc88c715eb033345c51e0693d1d783a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a632d69742f796969322d656e762d73796e63)](https://camo.githubusercontent.com/56d4f8080e72a7accb13355e0ce76aa6bc88c715eb033345c51e0693d1d783a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a632d69742f796969322d656e762d73796e63)[![Packagist Monthly Downloads](https://camo.githubusercontent.com/0de19db84ca368c8f5ac13622ee15acd040ca1c70c902b18e74aab64b3abd5ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a632d69742f796969322d656e762d73796e63)](https://camo.githubusercontent.com/0de19db84ca368c8f5ac13622ee15acd040ca1c70c902b18e74aab64b3abd5ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a632d69742f796969322d656e762d73796e63)[![GitHub tag (latest by date)](https://camo.githubusercontent.com/bf3ce5727853475496e9d5b287b68e4806a65b99840a6cdd64b8603f48f5b058/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6a632d69742f796969322d656e762d73796e63)](https://camo.githubusercontent.com/bf3ce5727853475496e9d5b287b68e4806a65b99840a6cdd64b8603f48f5b058/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6a632d69742f796969322d656e762d73796e63)[![Packagist Version](https://camo.githubusercontent.com/46c04406e63166314ed0fee8a7554b3512d3e237744ac3e1650e0356de24b3c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a632d69742f796969322d656e762d73796e63)](https://camo.githubusercontent.com/46c04406e63166314ed0fee8a7554b3512d3e237744ac3e1650e0356de24b3c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a632d69742f796969322d656e762d73796e63)

This extension provides a package that implements a module to sync environments between devices via an external storage.

```
$ composer require jc-it/yii2-env-sync
```

or add

```
"jc-it/yii2-env-sync": "^"

```

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

Configuration
-------------

[](#configuration)

To configure the module, add the module to your config file (preferably only in the Dev configuration).

```
    'bootstrap' => ['dev-sync'],
    'components' => [
        'db' => [
            'class' => \yii\db\Connection::class,
            ...
        ],
        'externalStorageComponent' => function () {
            // Return a filesystem
            return new Filesystem(...);
        },
        'storageComponent1' => function () {
            // Return a filesystem
            return new Filesystem(...);
        },
    ],
    'modules' => [
        'env-sync' => [
            'class' => EnvSync::class,
            'branch' => null,
            'canSync' => YII_ENV_DEV,
            'syncFilesystem' => 'externalStorageComponent',
            'dbList' => [
                // Map of name to component or configuration
                'db' => 'db',
            ],
            'fileSystems' => [
                '/storage1' => 'storageComponent1',
                '/storage2' => new Filesystem(new LocalFilesystemAdapter(...)),
            ],
            'user' => 'dev-user',
        ]
    ]
```

TODO
----

[](#todo)

- Fix PHPStan, re-add to `captainhook.json`
    - ```
        {
            "action": "vendor/bin/phpstan",
            "options": [],
            "conditions": []
        },

        ```
- Add tests

Credits
-------

[](#credits)

- [Joey Claessen](https://github.com/joester89)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/jc-it/yii2-env-sync/blob/master/LICENSE) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~246 days

Total

5

Last Release

73d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.1.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/88359ebe0456645a614e563dfbf0dd025b69ef57221050cb9eb31e3eef4dd0f9?d=identicon)[joester89](/maintainers/joester89)

---

Top Contributors

[![joester89](https://avatars.githubusercontent.com/u/9624366?v=4)](https://github.com/joester89 "joester89 (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jc-it-yii2-env-sync/health.svg)

```
[![Health](https://phpackages.com/badges/jc-it-yii2-env-sync/health.svg)](https://phpackages.com/packages/jc-it-yii2-env-sync)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[overtrue/php-opencc

中文简繁转换，支持词汇级别的转换、异体字转换和地区习惯用词转换（中国大陆、台湾、香港、日本新字体）。基于 \[BYVoid/OpenCC\](https://github.com/BYVoid/OpenCC) 数据实现。

12130.7k](/packages/overtrue-php-opencc)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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