Pros:
mjphaynes/php-resque (v2.1), a battle-tested PHP port of Redis-backed job queues. Fits systems using Resque for background processing.Cons:
php-resque ~2.1, which may lag behind newer versions (e.g., v4.x) with updated APIs or features.AppKernel, routing.yml), requiring manual adaptation for Laravel.routes/web.php using middleware for security (e.g., auth:admin).ContainerAware services).php-resque (Redis, PHP 5.6+), Symfony’s HttpKernel (for routing/security), and Bootstrap 3 (for UI). Laravel’s service container can mock Symfony’s ContainerInterface if needed.EventDispatcher, Templating component) to Laravel. Risk of breaking UI features or security.%kernel.root_dir%/../vendor/...). Laravel’s mix or vite would need to replicate this.php-resque v2.1.php-resque the primary queue system, or is Laravel’s queue system (e.g., queue:work) already in use? If the latter, assess effort to dual-support or migrate.ROLE_ADMIN) mapped in Laravel? Will middleware like Gate or Can suffice, or is a custom guard needed?php-resque or Symfony dependencies (e.g., Twig) require patches?Laravel Compatibility:
php-resque is installed and Redis is configured.HttpKernel → Laravel’s Illuminate\Contracts\Http\Kernel.Twig → Laravel’s Blade (or use a standalone Twig instance).Security Component → Laravel’s Auth + custom middleware.queue:failed and Redis CLI tools.Non-Laravel Stacks:
Phase 1: Dependency Setup
php-resque and configure Redis in Laravel’s .env:
RESQUE_REDIS_HOST=redis
RESQUE_REDIS_PORT=6379
resque: vs. laravel:queue).Phase 2: Route Integration
AndarisResqueWebUiBundle/Resources/config/routing.yml and add to routes/web.php:
Route::prefix('resque')->middleware(['auth', 'role:admin'])->group(function () {
Route::get('/', [ResqueController::class, 'index']);
// Add other routes (queues, jobs, etc.)
});
ResqueController to proxy requests to the bundle’s logic (or use a service container alias).Phase 3: Security
access_control with Laravel middleware:
// app/Http/Middleware/CheckAdminRole.php
public function handle($request, Closure $next) {
if (!auth()->user()->hasRole('admin')) {
abort(403);
}
return $next($request);
}
app/Http/Kernel.php.Phase 4: Asset Handling
Resources/public/) to Laravel’s public/resque/ and update paths in Twig templates (or replace Twig with Blade).Phase 5: Testing
resque:workers/resque:queues CLI output.php-resque’s expected schema (e.g., keys prefixed with resque:).php-resque updates for compatibility.resque:workers CLI).redis-cli --scan --pattern 'resque:*').queue:failed table for job inspection.php-resque updates (may break UI if APIs change).dd($this->container)).resque:workers, resque:queues) if UI data is stale.How can I help you explore Laravel packages today?