- Is insidestyles/swoole-bridge-bundle a Laravel package or a Symfony bundle?
- It is a Symfony bundle, indicated by both the package name and the Bundle suffix. It wires a Swoole server into Symfony's dependency injection container and framework bootstrapping. A Symfony bundle does not drop into a Laravel application, so any Laravel usage would require porting the integration yourself.
- Can I use this Swoole bridge in a Laravel application?
- Not directly. The package targets Symfony's container and request lifecycle, and there is no evidence in the metadata that the vendor intends Laravel support. If your goal is Laravel on a persistent worker runtime, Laravel Octane is the first-party baseline with Swoole, RoadRunner, and FrankenPHP backends. Adopting this package for Laravel would mean maintaining a custom bridge on top of an already low-adoption dependency.
- How do I install insidestyles/swoole-bridge-bundle with Composer?
- Install it with composer require insidestyles/swoole-bridge-bundle, then register the bundle in your Symfony application's bundles.php or config/bundles.php. You must also have the Swoole or OpenSwoole extension compiled into the runtime, pinned to your PHP minor version. Check the package's composer.json for the exact Symfony version constraints before committing.
- Do I need the Swoole extension installed to run this bundle?
- Yes. Swoole is a PHP C extension that replaces the per-request process model with a coroutine event loop and a pre-forked worker pool, so it must be compiled into your runtime image. That means swapping your base image, keeping CI and local development in parity, and maintaining a build matrix across PHP versions. Shared hosting and most managed PHP platforms are immediately out of scope.
- Which Symfony or Laravel versions does this bundle support?
- Laravel is not supported at all, since this is a Symfony bundle. For Symfony, verify the version constraints in the package's composer.json rather than relying on the README, because bridges are tightly coupled to container bootstrapping and request/response factories. With zero dependents, no downstream pressure keeps it compatible with new framework minor releases.
- How does this bridge prevent request state leaking between requests?
- A long-running worker keeps the container, singletons, static caches, superglobals, and config overrides alive across requests, so the bridge must sandbox or reset that state. The critical question is exactly which request-scoped state the bridge resets, and whether that is documented or must be reverse-engineered from the source. Auth, session, locale, and configuration overrides are the usual leak points, and detecting them requires deliberate adversarial testing rather than happy-path smoke tests.
- Is this package actively maintained and safe for production use?
- The adoption signal is weak: roughly 31 stars, zero dependents, and a composite score around 0.305. Zero dependents means there is no observable production usage, no ecosystem of issues documenting real failure modes, and no one applying pressure to keep it compatible with framework upgrades. Abandonment risk is high, and the person who owns that maintenance burden would be whoever adopts it.
- What are the alternatives to this package for running PHP on Swoole workers?
- For Laravel, Laravel Octane is the first-party option and supports Swoole, RoadRunner, and FrankenPHP backends. RoadRunner is worth considering on its own because it needs no PHP extension while providing the same long-running worker model. Both are better supported than a low-adoption bridge, so the justification for choosing this package has to be specific to Symfony and concrete.
- How do I test a Swoole bridge for state leakage and worker safety?
- Write adversarial tests that fire concurrent requests across routes touching auth, session, locale, and config overrides, then assert that no values survive between them. Happy-path functional tests will not catch bleeding state because the failure only appears under interleaved coroutine execution. Also plan for debugging friction, since Xdebug is unreliable under coroutines and step-debugging a forked worker pool is materially harder than a standard FPM request.
- When does a Swoole bridge actually make sense compared to PHP-FPM?
- It fits I/O-bound JSON APIs with a genuinely high requests-per-second profile, already containerized, where the team is comfortable operating a compiled PHP extension. It is a poor fit for CPU-bound work or large-file-upload endpoints, because a blocked worker stalls the event loop, so segment your route surface before committing. Without a benchmark showing FPM is the actual bottleneck, migrating is optimization without a target.