Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Resque Laravel Package

resquebundle/resque

ResqueBundle provides Symfony integration for Redis-backed Resque background jobs, with services and console commands to enqueue tasks, start and manage workers, and monitor queues. It wraps the PHP Resque port and adds simple configuration for queues and worker lifecycle in Symfony projects.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Requirements first: this release is the PHP 8-only line. Confirm the project runs PHP >= 8.0 before pulling 5.0.3; on PHP 7.x you must stay on the previous major/minor.
  • Install: composer require the package, then publish its config (php artisan vendor:publish --tag=resque-config or the provider's publish group) and review the Redis connection block (host, port, database, password).
  • Where to look first:
    • config/resque.php (or equivalent) — connection + queue definitions.
    • StartWorkerCommand — the class changed in this release; it now accepts/uses auth when connecting.
    • The package's job base class / perform() contract.
  • First use case: define a minimal job class with a perform() method, enqueue it from a controller or artisan command, then run the worker via the package's artisan command and watch the job execute. Validate the happy path on a non-production Redis database before wiring queues into your app.

Implementation Patterns

  • Job classes as plain objects: keep job payloads small and serializable (scalars/arrays). Pass IDs and re-hydrate Eloquent models inside perform() rather than serializing models.
  • Enqueue from services, not controllers: wrap the enqueue call behind a small service/action so queue names and payload shapes live in one place and are easy to test.
  • Queue topology: declare named queues with explicit priority order in config; run workers per queue (or per priority list) under Supervisor with numprocs, autostart, and restart-on-exit.
  • Auth wiring (new in this release): supply the Redis password through the package config sourced from env (REDIS_PASSWORD), so StartWorkerCommand authenticates consistently with the rest of the app's Redis connections. Never hardcode it in config.
  • Deploy workflow: enqueue during the web request, but run and restart workers as a deploy step (queue:restart equivalent or Supervisor restart) so long-lived workers pick up new code.
  • Integration: if the app already uses Laravel's queue system, treat this as a separate driver — document which jobs go through Resque vs. the native queue to avoid double-dispatch confusion.
  • Testing: point the package at a dedicated Redis DB index in phpunit.xml, flush it between tests, and assert enqueues by inspecting the Redis queue or using the package's test helpers if provided.

Gotchas and Tips

  • PHP 8 is a hard break: typed properties, constructor promotion, and named arguments in the package can conflict with subclassed job classes written for PHP 7. Audit custom job base classes and overrides during upgrade.
  • Workers cache code in memory: code changes are not picked up by running workers. Any deploy that changes job classes must restart workers, or you'll debug "stale" behavior for hours.
  • Auth failures surface as connection errors: if StartWorkerCommand now passes credentials, a missing/blank password env var typically shows up as a generic Redis NOAUTH/connection refused. Check env resolution before the worker process, and log the resolved host/port/db (never the password).
  • Database index collisions: sharing a Redis DB between cache/session/Resque causes opaque key clashes and jobs disappearing on cache flush. Isolate Resque on its own database index.
  • Failed jobs need a home: configure the failure backend and actually inspect it; without it, exceptions in perform() vanish.
  • Memory growth: long-running workers leak memory in PHP. Set a job/interval limit and let Supervisor recycle processes.
  • Extension points worth knowing: the job class resolver (for namespaced jobs), the worker event hooks (before/after job, on failure), and the connection factory — these are the cleanest places to add logging/metrics without forking the package.
  • Pin the version: given the PHP 8-only branch and a command-level behavior change, pin ^5.0.3 in composer.json and run the worker command manually once in staging to confirm auth works before rolling to production.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo