- Is leaseweb/guzzle-bundle compatible with Laravel?
- No. leaseweb/guzzle-bundle is a Symfony 2 bundle, not a Laravel package, and its service container and Web Debug Toolbar integration have no direct Laravel equivalent. It also depends on Symfony 2-era framework and dependency-injection components, so Composer conflicts are likely in modern Laravel applications. Laravel's native HTTP client is the better fit for new Laravel work.
- How do I install leaseweb/guzzle-bundle?
- Historically you install it with Composer using leaseweb/guzzle-bundle, enable LswGuzzleBundle in the Symfony kernel, and configure named clients in the bundle configuration. That workflow targets legacy Symfony 2 applications, not current Symfony or Laravel stacks. Check dependency resolution carefully before attempting it in any maintained project.
- Which Symfony and PHP versions does LswGuzzleBundle support?
- The bundle is built for Symfony 2-era framework-bundle and dependency-injection components, which are end-of-life and effectively capped around PHP 7.x in practice. It is not designed for Symfony 6 or 7, nor for modern PHP 8.2+ Laravel applications. Upgrading it would require porting the bundle rather than simply bumping versions.
- Does leaseweb/guzzle-bundle support Guzzle 7?
- No, it assumes Guzzle 3, 5, or 6 semantics from the Symfony 2 era, including older plugin and event-subscriber patterns. Current Guzzle 7 uses a different middleware model, so compatibility is not a configuration change. Making it work would amount to a rewrite of the bundle's client bootstrapping.
- Can I define multiple named Guzzle clients in YAML with this bundle?
- Yes, defining multiple named Guzzle clients in YAML is the bundle's core value. You can configure default request options, custom handlers, and middleware stacks per client, with sensible defaults and per-client overrides. Those clients are then registered as Symfony dependency-injection services.
- How do I add middleware or custom handlers to a client in LswGuzzleBundle?
- The bundle supports custom handlers, middleware, and default request options through its per-client configuration. You define the stack for each named client and let the bundle wire it into the Symfony service container. In Laravel or modern Guzzle, use a HandlerStack in a native client factory instead.
- What is the Laravel equivalent of the bundle's Symfony profiler integration?
- There is no direct Laravel equivalent because the bundle's DataCollector and Web Debug Toolbar panel are Symfony-specific. In Laravel, use Telescope or Clockwork for development visibility into outgoing requests, or add Guzzle history and logging middleware for structured request and response data. Laravel's HTTP client also provides a cleaner integration point.
- Can I use leaseweb/guzzle-bundle for testable HTTP clients in Laravel?
- Not directly. The bundle's testability comes from Symfony container-managed services, while Laravel testing typically uses Http::fake or Guzzle MockHandler. For named clients in Laravel, bind preconfigured Guzzle clients or client factories in a service provider and fake them in tests. That gives you the same testable boundary without legacy bundle dependencies.
- Is leaseweb/guzzle-bundle maintained and safe for production?
- It is archived upstream, has no security patching, no PHP 8 work, and no Guzzle 7 support, so production use carries high technical risk. The low star count and lack of dependents also mean little community support or upgrade guidance. If it remains in a legacy Symfony service, assign an owner and a patching budget rather than treating it as a safe default.
- What should I use instead of leaseweb/guzzle-bundle in Laravel?
- Use Laravel's HTTP client, which wraps Guzzle and exposes a clean, testable API. Put named client configuration in config files or a service provider, add retry and logging middleware as needed, and use Telescope or Clockwork for development visibility. Http::fake and Guzzle MockHandler cover testing without relying on an archived Symfony 2 bundle.