Closed koenkivits closed 2 years ago
laminas-cli is currently listed as a dependency. We might only want to add it as a suggestion though ("install laminas-cli if you want the CLI integration")
@koenkivits Not sure what you want with this repo if you are not going to use the CLI :P? I would keep requiring in!
Closes #242
This PR has gotten a bit bigger that I had wanted it to be, but I hope it's good enough. :) I added additional tests and tested the entire thing with our own codebase.
Change overview
laminas-cli
. The new command is:vendor/bin/laminas slm-queue:start
(no need to specify an adapter)WorkerPluginManager
, rather than the default Laminas/Mezzio service managerQueueInterface::getWorkerName()
, which lets queues specify which worker should process the queue. Queues extendingAbstractWorker
only need to specify aprotected static $defaultWorkerName
require-dev
(since there already was a config and Composer script)SlmQueueDoctrine
)test
script for running all tests in a single commandMigrating
Migrating to this version should look something like this:
worker_manager
configgetWorkerName()
TODO
UPGRADE.md
if this gets releasedNotes
QueueInterface::getWorkerName()
as a temporary solution. All adapter worker implementations are pretty much the same, so eventually we might want to just have a single implementation in the main repolaminas-cli
is currently listed as a dependency. We might only want to add it as a suggestion though ("installlaminas-cli
if you want the CLI integration")SlmQueueDoctrine
(link below)@roelvanduijnhoven can I ask you to review this one?