Download the PHP package phil/scheduled-transitions-bundle without Composer
On this page you can find all versions of the php package phil/scheduled-transitions-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phil/scheduled-transitions-bundle
More information about phil/scheduled-transitions-bundle
Files in phil/scheduled-transitions-bundle
Package scheduled-transitions-bundle
Short Description Publish a page on Monday at nine and unpublish it a month later, with no one online: transitions planned for a moment in Symfony, applied on time, with retries.
License MIT
Homepage https://ph-il.ca
Informations about the package scheduled-transitions-bundle
phil/scheduled-transitions-bundle
Publish a page on Monday at nine, unpublish it a month later, without anyone online.
phil/scheduled-transitions-bundle plans transitions for a moment in a Symfony application. A transition is a name, such
as publish, unpublish or archive, applied to a resource at a given time. It is kept in Doctrine until it is due,
then applied by a TransitionHandler the application writes, or through symfony/workflow with its guards and events.
A handler that throws is a failed attempt: the transition stays pending and is tried again at the next run, until its
attempts are spent. Planning the same transition twice for a resource moves it instead of doubling it.
It is for an application where editors prepare content ahead of time: an announcement that goes live at a set hour, a promotion that ends on its own, a page that is archived after an event. The bundle knows nothing of what publishing means for a page; the handler or the workflow does.
The bundle runs from Symfony Scheduler, which consumes a message every minute by default, or from
phil:scheduled-transitions:run in a cron job when there is no worker. Resources are named through phil/resource. The
design keeps the planning, the attempts and the running in the bundle, and leaves the effect of each transition to a
port, so one schedule serves every kind of resource.
Status
| Part | State |
|---|---|
ScheduledTransition, TransitionStatus, the repository port |
Implemented and tested |
Scheduler: schedule, move, cancel, run what is due; TransitionHandler, RunReport |
Implemented and tested |
DoctrineScheduledTransitionRepository |
Implemented and tested |
WorkflowTransitionHandler, SubjectResolver |
Implemented and tested |
Symfony Scheduler: the phil_transitions schedule; phil:scheduled-transitions:run |
Implemented and tested |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, registering, configuration, the table. |
| Scheduling | Scheduling, moving, cancelling, runs and retries. |
| Handlers | A handler of the application's own; the workflow handler. |
| Running | Symfony Scheduler, or the command from cron; runs that overlap; a handler that breaks the entity manager. |
| Extension points | What an application implements, configures, replaces or relies on. |
| Testing | How the bundle is tested. |
| Reference | Every type of the bundle. |
Quick start
Requirements
PHP 8.5 or later with ext-mbstring; Doctrine ORM 3.7; PSR-20; Symfony 8.2's dependency injection, config and UID;
phil/resource 0.1 for resource references. Symfony Scheduler and Messenger, Workflow and Console are optional.
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 scheduled-transitions-bundle with dependencies
ext-mbstring Version *
doctrine/dbal Version ^4.5
doctrine/orm Version ^3.7
phil/resource Version ^0.1@dev
psr/clock Version ^1.0
symfony/config Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/uid Version ^8.2