Skip to content

QueueDbPlugin

Registers the db queue driver alias and publishes queue.db.* config defaults.

DbQueueDriver/DbFailedJobStore are registered as explicit container services (not left to raw constructor autowiring) because they need the app’s real, already-initialize()d DatabaseManager — that only exists on the current Context, not as a container-autowired fresh instance (which would have no configured connections). See QueueDbPlugin::resolvePdo().

DbFailedJobStore is registered as DbFailedJobStore::class only, not bound as the default FailedJobStoreInterface — an app opts into persistent dead-letter storage explicitly ($registrar->service(FailedJobStoreInterface::class, ...) in its own plugin/bootstrap), rather than this package silently overriding QueuePlugin’s default depending on plugin declaration order.

final class QueueDbPlugin implements PluginInterface

ImplementsPluginInterface
SourceQueueDbPlugin.php
MethodDescription
register(PluginRegistrar $registrar): voidPublishes the queue.db.* defaults and registers the db driver.

public function register(PluginRegistrar $registrar): void

Publishes the queue.db.* defaults and registers the db driver.

Adds the db alias to QueueDriverRegistry and binds DbQueueDriver and DbFailedJobStore as singleton services whose factories pull the configured connection’s PDO handle off the current Context. Neither factory runs here — the connection is only touched when something actually resolves one of those services.

ParameterTypeDescription
$registrarPluginRegistrar