Skip to content

tilttek/sets-bundle

✅ published

Use tilttek/sets in Symfony: stores chosen by configuration, and completions whose event was lost sent again by a command or a schedule.

tilttek/sets-bundle registers the Sets service of tilttek/sets from its configuration: the stores of the definitions and of the completions the application names — memory, for tests, when it names none —, its clock, its event dispatcher and the backoff of a holder whose delivery failed. It adds the tilttek:sets:deliver command, the DeliverPendingCompletions message and its handler, and the tilttek_sets schedule, each when its Symfony component is installed, so that a completion whose handler threw is told again without waiting for its holder's holdings to change.

Status

PartState
Configuration: stores, clock, backoff and scheduleImplemented and tested
Sets on the application's event dispatcherImplemented and tested
The tilttek:sets:deliver command, with --limit and --holderImplemented and tested
The DeliverPendingCompletions message and its handlerImplemented and tested
The tilttek_sets schedule, with an interval, a limit and a lockImplemented and tested
Doctrine stores of the definitions and the completionsNot started: the application names its own

Documentation

DocumentWhat it covers
InstallationRequirements, optional packages and registering the bundle.
ConfigurationEvery key, its default and what it sets.
Resuming deliveriesThe command, the schedule, its worker and its lock, and routing the message.
Extension pointsThe stores, the clock and the listeners of the events.
TestingThe bundle's tests.
ReferenceEvery class and service of the bundle.

Quick start

// config/bundles.php
Tilttek\SetsBundle\TilttekSetsBundle::class => ['all' => true],
# config/packages/tilttek_sets.yaml
tilttek_sets:
    definition_store: App\Sets\DefinitionStore
    completion_store: App\Sets\CompletionStore
    clock: clock
bin/console messenger:consume scheduler_tilttek_sets

Requirements

PHP 8.5 or later, Symfony 8.2 and tilttek/sets; symfony/console for the command, symfony/messenger for the handler, symfony/scheduler for the schedule and symfony/lock for its lock.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Tilttek project. See LICENSE.