- Can I use liip/cache-control-bundle in a Laravel application?
- No. It is a Symfony bundle that extends Symfony's Bundle class and depends on the Symfony DI container, event dispatcher, and HTTP kernel. Laravel's container and middleware pipeline are structurally incompatible, and there is no bridge or adapter. The repository is archived and unmaintained.
- What does liip/cache-control-bundle do?
- It adds declarative HTTP caching to Symfony controllers via annotations or PHP attributes like @Cache, @ETag, and @LastModified. It sets Cache-Control directives, generates ETags and Last-Modified headers, and returns 304 responses for conditional requests. It is designed for Symfony's HttpCache and reverse proxies such as Varnish.
- Is liip/cache-control-bundle still maintained?
- No. The last release was December 2013, the repository is archived, and the upstream author directs users to FOSHttpCacheBundle. It targets Symfony 2.x kernel event classes and configuration patterns that were renamed or removed in later Symfony versions. There are no security advisories because there is no active maintenance.
- What Laravel versions does liip/cache-control-bundle support?
- None. It is not a Laravel package and has no Laravel service provider, middleware, or configuration. It cannot be installed or booted in a Laravel application without a full port. Laravel version compatibility is not applicable.
- How do I install liip/cache-control-bundle?
- You would historically install it with Composer in a Symfony 2.x project and register the bundle in AppKernel. For Laravel, installation is not supported because the package requires Symfony kernel and DI contracts. On modern PHP 8.1 and later it will not autoload cleanly, let alone boot.
- What are alternatives to liip/cache-control-bundle for Laravel?
- For response headers only, use native Laravel middleware to set Cache-Control, ETag, Vary, and Surrogate-Control. For full-page response caching, use spatie/laravel-responsecache, which is Laravel-native and actively maintained. For surrogate or CDN invalidation, consider friendsofsymfony/http-cache with custom Laravel bindings as a framework-agnostic core.
- How do I configure and test Cache-Control headers in Laravel without this bundle?
- Add a middleware that sets Cache-Control, ETag, and Last-Modified on the response, then assert headers in feature tests using assertHeader. For conditional requests, simulate If-None-Match or If-Modified-Since and assert a 304 status. This keeps the logic in Laravel's middleware pipeline with no external dependency.
- Does liip/cache-control-bundle work with Laravel's HTTP cache or middleware?
- No. It hooks into Symfony's kernel.response event and Symfony's HttpCache, not Laravel's middleware or response lifecycle. Laravel's middleware and Illuminate\Http\Response header bag use different contracts. Bridging them would require a compatibility shim larger than the functionality gained.
- What are the production risks of using liip/cache-control-bundle?
- The package is archived and unmaintained since 2013, so there are no fixes for bugs or security issues. It targets Symfony 2.x event classes and DI patterns removed in Symfony 5, so it will not run on modern PHP 8.1+ stacks. The risk is unbounded unknown behavior in an unmaintained dependency, not a known CVE.
- Should I port liip/cache-control-bundle to Laravel?
- A port is not justified. The bundle's domain is real, but the implementation is bound to a runtime Laravel does not use. If you need HTTP caching, adopt Laravel-native middleware, spatie/laravel-responsecache, or friendsofsymfony/http-cache with thin bindings. The bundle under evaluation contributes nothing to that decision.