PHPackages                             insolita/yii2-maintenance - 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. insolita/yii2-maintenance

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

insolita/yii2-maintenance
=========================

Component for maintenance mode behavior, focused on retrieve status from external configuration

0.0.1(9y ago)4101MITPHPPHP &gt;=5.6

Since Jun 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Insolita/yii2-maintenance)[ Packagist](https://packagist.org/packages/insolita/yii2-maintenance)[ RSS](/packages/insolita-yii2-maintenance/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Custom mantenance component
===========================

[](#custom-mantenance-component)

- Component for maintenance mode behavior, focused on retrieve status from external configuration
- Support ability for allow exclusive access in maintenance mode for specified ips
- Support preliminar notice about soon maintenance works
- Provide observable events when maintenance process or preliminar modes

[![Status](https://camo.githubusercontent.com/804f37e64cc50bf61b01874c3a2a79cebb7be1c5164a574ca7175ace6ead222b/68747470733a2f2f7472617669732d63692e6f72672f496e736f6c6974612f796969322d6d61696e74656e616e63652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/804f37e64cc50bf61b01874c3a2a79cebb7be1c5164a574ca7175ace6ead222b/68747470733a2f2f7472617669732d63692e6f72672f496e736f6c6974612f796969322d6d61696e74656e616e63652e7376673f6272616e63683d6d6173746572)

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

[](#installation)

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

Either run

```
composer require --prefer-dist insolita/yii2-maintenance "~0.0.1"

```

or add

```
"insolita/yii2-maintenance": "~0.0.1"

```

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

Usage
-----

[](#usage)

Once the extension is installed, add in config components section, and also bootstrap section :

```
     'bootstrap'=>['log','config','maintenance'],
     'container'=>[
     ...
         'definitions'=>[
             '\insolita\maintenance\IConfig'=>'your\config\component\class'
         ]
     ],
     ...
     'components'=>[
          'maintenance'=>[
              'class'=>'\insolita\maintenance\Maintenance',
              'enabledKey'=>'config key for maintennce indication',
              'preliminarKey'=>'config key for preliminar maintenance indication',
              'ipSkippedKey'=>'config key for comma-seperated ips with exclusive access',
              'catchRoute'=>['site/maintenance'], //- route catched all requests in maintenance mode
              //possible events use cases
              'on maintenance_process'=>function($event){
                  //$event->sender is maintenance component!
                  if($event->sender->isSkipForIp===true){
                     Yii::$app->getSession()->setFlash('warning','Site in maintenance mode!');
                  }
              },
              'on maintenance_soon'=>function($event){
                  Yii::$app->getSession()->setFlash('warning',
                  'After 5 minutes, the site will be serviced, please finish or save the undelivered messages');
               }
          ]
     ],
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40f26825f8c130796e3151e6c076721cf5bb222c42148102bb31a341a1a5c789?d=identicon)[Insolita](/maintainers/Insolita)

---

Top Contributors

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

---

Tags

hacktoberfestyii2extension

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/insolita-yii2-maintenance/health.svg)

```
[![Health](https://phpackages.com/badges/insolita-yii2-maintenance/health.svg)](https://phpackages.com/packages/insolita-yii2-maintenance)
```

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

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

Yii2 Cookie Consent Widget

1454.6k](/packages/dmstr-yii2-cookie-consent)[imanilchaudhari/yii2-currency-converter

This extension will help to find out current currency conversion rate.

1911.7k](/packages/imanilchaudhari-yii2-currency-converter)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

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

PHPackages © 2026

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