Download the PHP package phil/incident-mode-bundle without Composer
On this page you can find all versions of the php package phil/incident-mode-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phil/incident-mode-bundle
More information about phil/incident-mode-bundle
Files in phil/incident-mode-bundle
Package incident-mode-bundle
Short Description phil/incident-mode in Symfony: pause sign-ups, invitations or forms during an attack, with an honest public notice and automatic lifting.
License MIT
Homepage https://ph-il.ca
Informations about the package incident-mode-bundle
phil/incident-mode-bundle
The incident mode of phil/incident-mode in a Symfony application: suspend sign-ups, invitations, new messages or everything but reading for a duration that is always set, from an administration page or the console, and say so honestly to every visitor until it ends.
phil/incident-mode-bundle wires the library phil/incident-mode into Symfony. Its table lives on the DBAL connection
the application chooses, and the schema listener of the library adds it to the schema Doctrine generates. The presets
come from the configuration: the five built-in ones, the application's own, some replaced or left out. An incident is
started, extended within its preset and lifted from an administration page — protected by a role, every form posted
with a CSRF token, built from the recipes of the PHIL UX kit or of the Shadcn kit — or from four console commands, in
the name of an actor known by a stable identifier, never an e-mail address.
While an incident is in force, the checkpoints refuse what it suspends: a controller that carries
#[SuspendedDuring('signups')], a route whose defaults name a restriction, a code path that calls
Checkpoint::guard(), a form with the option suspended_during. A refusal is a page that says what is suspended and
until when, in the visitor's language and the configured time zone, with the status 503 and a Retry-After header. A
banner and a public status page say the same. Established members are spared from the restrictions the configuration
lists, through the library's port EstablishedMembers, which the application points at its own trust levels.
Each incident is lifted at its end by the library's delayed Messenger message, and a recurring sweep of Symfony
Scheduler records the end of any incident whose message a transport lost. The events of the library go through
Symfony's event dispatcher; with phil/audit-bundle registered, every start, extension and lifting is written to its
trail, and with phil/privacy-bundle, the incidents a member started or lifted answer their access and erasure
requests. The services keep nothing between requests.
Status
| Part | State |
|---|---|
| The table on a configurable connection, the schema listener, the presets of the configuration | Implemented and tested on SQLite, MySQL and PostgreSQL |
phil:incident:start, phil:incident:extend, phil:incident:lift, phil:incident:list |
Implemented and tested |
| The administration page: start from a preset, extend within it, lift, the journal a page at a time | Implemented and tested with the PHIL UX kit and the Shadcn kit |
| The lifting by the delayed Messenger message and the recurring sweep of Symfony Scheduler | Implemented and tested |
| The refusal page, the status page, the notice fragment, the banner, the Twig functions | Implemented and tested in English and French |
#[SuspendedDuring], the route default _suspended_during, Checkpoint, the option suspended_during of the forms |
Implemented and tested |
Established members spared through EstablishedMembers, visitors never |
Implemented and tested |
| The audit through phil/audit-bundle, the export and erasure through phil/privacy-bundle | Implemented and tested |
| A table name of the application's choosing | Not available: the library names its table phil_incident_activation |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, registering the bundle, the table and its migration, the routes, the transports. |
| Configuration | Every option of phil_incident_mode, with an example. |
| Administration | The page, the role, the actor, the CSRF token, the kits, the layout and the console commands. |
| Checkpoints | The attribute, the route default, the service, the forms, the refusal page, the banner and the status page. |
| Automatic lifting | The delayed message, the recurring sweep, a cron job without Messenger. |
| Extension points | The services to replace, the events, the words and the templates. |
| Testing | The bundle's tests, the servers its integration tests read, the fuzz target and the benchmark. |
| Reference | Every class and service of the bundle. |
Quick start
Requirements
PHP 8.5 or later with ext-intl, Symfony 8.2 or later, Doctrine DBAL 4.5, Twig and the Symfony UX Twig components,
and phil/incident-mode 0.2. The console, the forms, Messenger, Scheduler, the ORM, phil/audit-bundle and
phil/privacy-bundle are used when they are installed.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.
All versions of incident-mode-bundle with dependencies
ext-intl Version *
ext-mbstring Version *
doctrine/dbal Version ^4.5
phil/incident-mode Version ^0.2@dev
psr/clock Version ^1.0
symfony/config Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/http-foundation Version ^8.2
symfony/http-kernel Version ^8.2
symfony/routing Version ^8.2
symfony/security-core Version ^8.2
symfony/security-csrf Version ^8.2
symfony/translation Version ^8.2
symfony/translation-contracts Version ^3.6
symfony/ux-twig-component Version ^3.7
twig/intl-extra Version ^3.30
twig/twig Version ^3.21