PHPackages                             bretrzaun/maintenance-bundle - 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. bretrzaun/maintenance-bundle

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

bretrzaun/maintenance-bundle
============================

Bundle for maintenance switch in Symfony applications

0.5.0(7mo ago)836.1k↓25%2MITPHPPHP &gt;=8.1CI passing

Since Nov 23Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/bretrzaun/MaintenanceBundle)[ Packagist](https://packagist.org/packages/bretrzaun/maintenance-bundle)[ RSS](/packages/bretrzaun-maintenance-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (12)Versions (8)Used By (0)

Maintenance Bundle
==================

[](#maintenance-bundle)

[![Tests](https://github.com/bretrzaun/MaintenanceBundle/actions/workflows/tests.yml/badge.svg)](https://github.com/bretrzaun/MaintenanceBundle/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/0e7214bd8c7d85a121dd3bf0b30619ce684a4fbe61b58f752d32da9115242041/68747470733a2f2f706f7365722e707567782e6f72672f62726574727a61756e2f6d61696e74656e616e63652d62756e646c652f762f737461626c65)](https://packagist.org/packages/bretrzaun/maintenance-bundle)[![Total Downloads](https://camo.githubusercontent.com/32d6cb2e2d11ebc954b2c5089f2c3100cb222230213a7f9be2bce6723e85e4c4/68747470733a2f2f706f7365722e707567782e6f72672f62726574727a61756e2f6d61696e74656e616e63652d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/bretrzaun/maintenance-bundle)[![License](https://camo.githubusercontent.com/a2c2b12392f493b722ea7b2709bfaa6d4b065d6a0422c6bb2cf3c466d9392c34/68747470733a2f2f706f7365722e707567782e6f72672f62726574727a61756e2f6d61696e74656e616e63652d62756e646c652f6c6963656e7365)](https://packagist.org/packages/bretrzaun/maintenance-bundle)

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

[](#installation)

```
composer require bretrzaun/maintenance-bundle

```

Register bundle in `config/bundles.php`:

```
\BretRZaun\MaintenanceBundle\MaintenanceBundle::class => ['all' => true]
```

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

[](#configuration)

Create the following configuration file

```
# config/packages/maintenance.yaml
maintenance:
    enabled: false
    template: 'maintenance.html.twig'

    # Maintenance window start
    from: 2018-12-01 00:00:00

    # Maintenance window end
    until: 2018-12-03 00:00:00

    # IP addresses allowed to access during maintenance
    # Supports:
    # - Wildcards: 10.*.*.* or 192.168.*.*
    # - CIDR notation: 192.168.1.0/24
    # - IPv6: 2001:db8::/32
    # - Exact IPs: 192.168.1.1
    allowed_ip:
      - '10.*.*.*'           # All 10.x.x.x IPs
      - '192.168.1.0/24'     # Entire /24 network
      - '2001:db8::/32'      # IPv6 network
      - '203.0.113.42'       # Single IP
```

### Options

[](#options)

- **enabled**: if set to `true` manually activates the maintenance mode
- **template**: template to render, when maintenance mode is activated
- **from**: begin maintenance mode at the given date/time (only when 'enabled' is false)
- **until**: end maintenance mode at the given date/time (only when 'enabled' is false)
- **allowed\_ip**: list of IP addresses who can access the application even in maintenance mode

Template
--------

[](#template)

The bundle has a default maintenance template (see `src/Resources/views/maintenance.html.twig`).

You can use your own template (see configuration). In case your maintenance template extends from a parent layout you might want to exclude certain parts while in maintenance (e.g. a menu). This can be done with like so:

```
    {% if not maintenance_mode() %}
        ...
    {% endif %}
```

If the option "allowed\_ip" is used, certain users can access the application even it is in maintenance mode. To make these users aware of this you can add the following to the layout template:

```
{% if maintenance_mode_allowed() %}
    Maintenance mode is activated!
{% endif %}
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance71

Regular maintenance activity

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 94.2% 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 ~419 days

Recently: every ~535 days

Total

7

Last Release

216d ago

PHP version history (4 changes)0.1.0PHP &gt;=7.1.3

0.3.0PHP &gt;=7.2

0.4.0PHP &gt;=8.0

0.5.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/277782?v=4)[Bret R. Zaun](/maintainers/bretrzaun)[@bretrzaun](https://github.com/bretrzaun)

---

Top Contributors

[![bretrzaun](https://avatars.githubusercontent.com/u/277782?v=4)](https://github.com/bretrzaun "bretrzaun (98 commits)")[![johanv](https://avatars.githubusercontent.com/u/586145?v=4)](https://github.com/johanv "johanv (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![knallcharge](https://avatars.githubusercontent.com/u/1715912?v=4)](https://github.com/knallcharge "knallcharge (1 commits)")[![nicohery](https://avatars.githubusercontent.com/u/881477?v=4)](https://github.com/nicohery "nicohery (1 commits)")

---

Tags

maintenance-modephpsymfonysymfony-bundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bretrzaun-maintenance-bundle/health.svg)

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

###  Alternatives

[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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