{"id":16461556,"url":"https://github.com/bretrzaun/maintenancebundle","last_synced_at":"2025-03-23T10:33:40.694Z","repository":{"id":62496892,"uuid":"158571437","full_name":"bretrzaun/MaintenanceBundle","owner":"bretrzaun","description":"Maintenance bundle for Symfony applications","archived":false,"fork":false,"pushed_at":"2023-12-05T09:47:49.000Z","size":91,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T11:08:32.128Z","etag":null,"topics":["maintenance-mode","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bretrzaun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-21T15:47:03.000Z","updated_at":"2022-07-07T07:34:36.000Z","dependencies_parsed_at":"2022-11-02T11:46:25.026Z","dependency_job_id":null,"html_url":"https://github.com/bretrzaun/MaintenanceBundle","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bretrzaun%2FMaintenanceBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bretrzaun%2FMaintenanceBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bretrzaun%2FMaintenanceBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bretrzaun%2FMaintenanceBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bretrzaun","download_url":"https://codeload.github.com/bretrzaun/MaintenanceBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221849553,"owners_count":16891488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["maintenance-mode","php","symfony","symfony-bundle"],"created_at":"2024-10-11T11:08:38.505Z","updated_at":"2024-10-28T15:36:38.236Z","avatar_url":"https://github.com/bretrzaun.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maintenance Bundle\n\n[![Tests](https://github.com/bretrzaun/MaintenanceBundle/actions/workflows/tests.yml/badge.svg)](https://github.com/bretrzaun/MaintenanceBundle/actions/workflows/tests.yml) \n[![Latest Stable Version](https://poser.pugx.org/bretrzaun/maintenance-bundle/v/stable)](https://packagist.org/packages/bretrzaun/maintenance-bundle)\n[![Total Downloads](https://poser.pugx.org/bretrzaun/maintenance-bundle/downloads)](https://packagist.org/packages/bretrzaun/maintenance-bundle)\n[![License](https://poser.pugx.org/bretrzaun/maintenance-bundle/license)](https://packagist.org/packages/bretrzaun/maintenance-bundle)\n\n## Installation\n\n```\ncomposer require bretrzaun/maintenance-bundle\n```\n\nRegister bundle in `config/bundles.php`:\n\n```php\n\\BretRZaun\\MaintenanceBundle\\MaintenanceBundle::class =\u003e ['all' =\u003e true]\n```\n\n## Configuration\n\nCreate the following configuration file\n\n```yaml\n# config/packages/maintenance.yaml\nmaintenance:\n    enabled: false\n    template: 'maintenance.html.twig'\n    #from: 01.12.2018 00:00:01\n    #until: 03.12.2018 00:00:01\n    allowed_ip: ['10.*.*.*']\n```\n\n### Options\n\n- **enabled**: if set to `true` manually activates the maintenance mode\n- **template**: template to render, when maintenance mode is activated\n- **from**: begin maintenance mode at the given date/time (only when 'enabled' is false)\n- **until**: end maintenance mode at the given date/time (only when 'enabled' is false)\n- **allowed_ip**: list of IP addresses who can access the application even in maintenance mode\n\n## Template\n\nThe bundle has a default maintenance template (see `src/Resources/views/maintenance.html.twig`).\n\nYou can use your own template (see configuration). In case your maintenance template extends from a parent layout\nyou might want to exclude certain parts while in maintenance (e.g. a menu).\nThis can be done with like so:\n```twig\n    {% if not maintenance_mode() %}\n        ...\n    {% endif %}\n```\n\nIf the option \"allowed_ip\" is used, certain users can access the application even it is in maintenance mode.\nTo make these users aware of this you can add the following to the layout template:\n\n```twig\n{% if maintenance_mode_allowed() %}\n    \u003cdiv class=\"alert alert-warning\"\u003eMaintenance mode is activated!\u003c/div\u003e\n{% endif %}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretrzaun%2Fmaintenancebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbretrzaun%2Fmaintenancebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretrzaun%2Fmaintenancebundle/lists"}