PHPackages                             tourhunter-com/yii2-dev-updater - 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. tourhunter-com/yii2-dev-updater

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

tourhunter-com/yii2-dev-updater
===============================

Yii2 component to simplify composer and migrations updates

51.2k1PHP

Since Jun 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tourhunter-com/yii2-dev-updater)[ Packagist](https://packagist.org/packages/tourhunter-com/yii2-dev-updater)[ RSS](/packages/tourhunter-com-yii2-dev-updater/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-dev-updater
================

[](#yii2-dev-updater)

Yii2 component to simplify composer and migrations updates.

It helps to track the presence of changes in migrations and composer packages after new commits in git, and allows to trigger updates with just one click in browser.

The repository is a part of the [TourHunter Organization](https://github.com/tourhunter-com). This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).

Contributing
------------

[](#contributing)

Please read through our [Contributing Guidelines](CONTRIBUTING.md).

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

[](#installation)

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

Either run

```
composer require tourhunter-com/yii2-dev-updater

```

or add

```
"tourhunter-com/yii2-dev-updater": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, add following code to your application web.php configuration file:

```
return [
    'bootstrap' => ['devUpdater'],
    //.....
    'components' => [
        //.....
        'devUpdater' => [
            'class' => 'tourhunter\devUpdater\DevUpdaterComponent',
        ],
    ]
]
```

An important note: trying to use the component for a console application will have no effect.

Following properties are available for customizing the updater component behavior.

#### allow\_env

[](#allow_env)

Defines the list of environments the component will activate in.

```
    'allow_env' => [ 'dev' ],
```

#### composerCommand

[](#composercommand)

It is possible to set up a console command for the Composer launch, if it's different from the default one.

```
    'composerCommand' => 'composer',
```

#### controllerId

[](#controllerid)

This parameter influences the controller name in the component page route.

```
    'controllerId' => 'dev-updater',
```

#### updaterServices

[](#updaterservices)

Defines a set of the active component update services, by default it looks this way:

```
    'updaterServices' => [
         'tourhunter\devUpdater\services\MigrationUpdaterService',
         'tourhunter\devUpdater\services\ComposerUpdaterService',
     ],
```

It is possible to disable composer or migrations updates by removing the related service from the list. Also it is possible to add a custom solution of the update logic, but that service must extend the class `tourhunter\devUpdater\UpdaterService`

#### lastUpdateInfoFilename

[](#lastupdateinfofilename)

A file path to store the important information about the status of previous updates or errors.

```
    'lastUpdateInfoFilename' => '@runtime/devUpdaterInfo.json',
```

#### updatingLockFilename

[](#updatinglockfilename)

A path to the lock file containing info of the update process execution.

```
    'updatingLockFilename' => '@runtime/devUpdater.lock',
```

#### sudoUser

[](#sudouser)

A username to execute update console commands.

```
    'sudoUser' => false,
```

In case of web server working under default users like apache or www-data it may cause problems during some commands' execution. For example, composer needs a default user folder to cache data. To avoid this problem, the component supports sudo commands execution. But before using that you must configure your server accordingly.

First of all you need to know whether you have a `mpm_itk` module on - it will block sudo usage. You need to add this into apache config:

```

    # Permit using "sudo"
    LimitUIDRange 0 65534
    LimitGIDRange 0 65534

```

The next step is to allow web server user to execute all necessary commands under different users. The settings in `/etc/sudoers`:

```
www-data ALL=(ALL) NOPASSWD: /bin/composer,/var/www/myYii2Project/yii

```

An essential thing is that you must show the right paths to the files used by the component. By default it is a console utility of Yii2 framework.

Also make sure to comment the following code in `/etc/sudoers` if it is there:

```
#Defaults    requiretty

```

License
-------

[](#license)

This project is open source and available freely under the [MIT license](LICENSE.md).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 52.5% 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.

### Community

Maintainers

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

---

Top Contributors

[![grandmotivator](https://avatars.githubusercontent.com/u/34159182?v=4)](https://github.com/grandmotivator "grandmotivator (21 commits)")[![sagifire](https://avatars.githubusercontent.com/u/482147?v=4)](https://github.com/sagifire "sagifire (18 commits)")[![RezaSR](https://avatars.githubusercontent.com/u/5926521?v=4)](https://github.com/RezaSR "RezaSR (1 commits)")

---

Tags

composer-packagemigration-toolopen-sourceupdate-checkerupdateryii2yii2-extensionyii2-migration

### Embed Badge

![Health badge](/badges/tourhunter-com-yii2-dev-updater/health.svg)

```
[![Health](https://phpackages.com/badges/tourhunter-com-yii2-dev-updater/health.svg)](https://phpackages.com/packages/tourhunter-com-yii2-dev-updater)
```

###  Alternatives

[ramsey/coding-standard

A common coding standard for Ramsey's PHP libraries.

1091.1k36](/packages/ramsey-coding-standard)

PHPackages © 2026

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