I am right now upgrading the FLOW3 based setup (to be) used for rendering TYPO3 documentation to run on Flow. This obviously includes replacing the git submodules with composer dependency handling, and during that I (again) came across the confusing situation when it comes to the job queue packages available for Flow. This post will hopefully resolve that confusion as far as possible.
When the implementation of a job queue was started, a generic base package was created that could be combined with implementations for concrete queues (like Redis or Beanstalkd). Those packages started out as TYPO3.Queue, TYPO3.Queue.Redis and TYPO3.Queue.Beanstalkd and are still available on the TYPO3 git server. And some changes for those packages were still in our Gerrit review system–changes that had the purpose to rename those packages to…
TYPO3.Jobqueue.Common, TYPO3.Jobqueue.Redis and TYPO3.Jobqueue.Beanstalkd. So far so good, but those already existed on the git server as well. And in another project I worked on, those were already used and pulled in via composer.
But none of the six packages mentioned so far were registered on Packagist, which made me wonder how confusing it would still be getting. I asked Bastian Waidelich about all that, knowing he had worked on those packages in the past, together with Christopher Hlubek, and his help boiled down to
why don't you just apply those changes and compare…–which is what I ended up doing. That resulted in three abandoned changes and three new ones.
- If you are about to start using job queues in a Flow application, go for the TYPO3.Jobqueue.* packages.
- If you are using them already, you can/should now fetch them through composer without having to specify their repositories
- If you are using the TYPO3.Queue family of packages, go ahead and read the remainder of this post :)
Switching from TYPO3.Queue to TYPO3.Jobqueue
Obviously you need to adjust a little when switching from TYPO3.Queue to TYPO3.Jobqueue. First of all, replace TYPO3\Queue\Beanstalkd with TYPO3\Jobqueue\Beanstalkd, that solves the majority of what is needed. Follow the same principle when using the Redis implementation.
Now replace the remaining TYPO3\Queue with TYPO3\Jobqueue\Common to adjust uses of the base package. Last but not least you need to adjust some of the class names, those that were in their packages top level namespace need adjustment (Queue has been added, so …\Beanstalkd\BeanstalkdQueue becomes …\Beanstalkd\Queue\BeanstalkdQueue).
If you are like me, you now forget about the configuration and wonder why it still doesn't work. You can avoid that by adjusting Settings.yaml files as needed, again TYPO3.Queue becomes TYPO3.Jobqueue and the configured queue implementations change.