- Does mmoreram/gearman-bundle work with Laravel?
- No. The package is a Symfony2 bundle (Mmoreram\GearmanBundle\GearmanBundle) loaded through Symfony's kernel, bundle discovery and DI compiler passes, so there is no service provider, publishable config or facade for Laravel. Installing it into a Laravel app gives you autoloadable classes and nothing wired up. The reusable part is the domain logic, not the package as an installable unit.
- Can I just composer require mmoreram/gearman-bundle in a Laravel project?
- You can run the require, but it will not give you a working integration: no service provider is registered and no workers are discovered. You also inherit two hard constraints, a required PECL gearman extension and a doctrine/annotations ^2.0 constraint that can clash with apps still resolving 1.x. Treat it as a reference implementation to port rather than a dependency to install.
- What PHP extension does GearmanBundle require?
- It has a hard dependency on ext-gearman, the PECL extension that wraps the libgearman C library and provides GearmanClient and GearmanWorker. Because Composer cannot install PECL extensions, every container, CI runner and developer laptop must ship the C library plus the extension. That constraint propagates through the entire architecture and is unchanged in recent releases.
- What changed in version 5.1.1 of GearmanBundle?
- The release is dependency housekeeping plus a small refactor: it tightens to doctrine/annotations ^2.0 and adjusts to that library's API. It does not add a Laravel service provider, PHP 8 attribute support, or any framework-agnostic entry point, so the annotation-reader-driven registration model remains. Note also that v5.1.0 was skipped, so treat it as bugfix plus dependency housekeeping rather than a compatibility statement.
- Why does GearmanBundle conflict with doctrine/annotations 1.x?
- Version 5.1.1 requires doctrine/annotations ^2.0, which creates a hard conflict with any application still resolving the 1.x line. Since that library is a common transitive dependency, a Laravel app that merely installs the bundle to inspect it can fail dependency resolution for reasons unrelated to Gearman. doctrine/annotations 2.x is itself deprecated upstream in favour of native PHP 8 attributes.
- Does GearmanBundle support PHP 8.3 and PHP 8.4?
- That is not verified: the changelog for the current tag names a single library, not a supported PHP and Symfony matrix change. The project has Symfony2 origins, so modern framework and PHP support should be empirically validated rather than assumed. In particular, test blocking work() loops on your target PHP minor for segfault behaviour before relying on it.
- What is the best alternative to GearmanBundle for background jobs in Laravel?
- For new work, use Laravel's native queue system with Redis, SQS or the database driver, plus Horizon for monitoring. If Gearman is already mandated by your platform, wrap ext-gearman in a thin Laravel-idiomatic client and worker command, or port the bundle's job definition parsing and dispatch loop into a service provider and custom queue driver. Both avoid pulling a second framework runtime into your stack.
- Can I run a Symfony Gearman worker alongside my Laravel application?
- Yes, and it is the only option that uses the bundle as designed: a standalone Symfony worker process beside Laravel, with the two sharing only the Gearman protocol. The cost is a second framework runtime on the platform for a single queue integration. Choose it only when the bundle's console commands, profiler and DI-based worker registration are genuinely worth that operational tax.
- Is Gearman still safe to run in production in 2025?
- Treat it with caution. Gearmand has had no substantive release since before PHP 8, and it offers no TLS, no authentication and no durable queue, because jobs live in daemon memory. The PECL extension cadence also lags PHP minors. If Gearman is not already mandated by your platform, it is the wrong default for a new Laravel application.
- How do I test Gearman jobs if I port this bundle to Laravel?
- The bundle's testing conveniences are Symfony-specific, including its profiler and logging integration, so nothing carries over to Laravel's test helpers. In practice you mock a thin client and worker wrapper for unit tests and run a real gearmand instance in CI for integration tests. Keep that wrapper small so the Gearman dependency stays isolated behind an interface you can fake.