Redis-backed async jobs and queue workers for Switon Framework.
composer require switon/queueRequirements: PHP 8.3+, Redis
use Switon\Core\Attribute\Autowired;
use Switon\Queue\QueueInterface;
class UserService
{
#[Autowired] protected QueueInterface $queue;
public function register(int $userId): void
{
$this->queue->push('emails', QueueEnvelope::of(['userId' => $userId]));
}
}Docs: https://docs.switon.dev/latest/queue
MIT.