- Can I use phy/cache-bundle in a Laravel application?
- No. It is a Symfony2 bundle loaded through AppKernel::registerBundles and configured via Symfony's DependencyInjection container, and Laravel has no bundle registry or equivalent loading path. Mounting it would mean pulling Symfony's HttpKernel and DI stack into Laravel. Use Laravel's native cache drivers instead.
- Is phy/cache-bundle a Laravel package or a Symfony bundle?
- It is a Symfony2 cache service bundle, not a Laravel package. It is registered through the Symfony kernel and configured in app/config/config.yml. Treat it as out of scope for any Laravel evaluation.
- Which cache backends does phy/cache-bundle support?
- It advertises APC, Memcache, Memcached, disk storage, Redis, and a local in-memory store. On modern PHP, APC and the legacy memcache extension are not viable: APC was removed in PHP 7.0 and memcache is superseded by memcached. Laravel already ships array, file, Redis, Memcached, and database drivers.
- Does phy/cache-bundle support Laravel 10 or Laravel 11?
- No. It targets Symfony 2.x, which reached end of life in 2018 and lost security support in November 2019. It has no Laravel service provider, facade, or config integration. Laravel 10 and 11 use the Illuminate\Cache stack, which is unrelated.
- How do I install phy/cache-bundle with Composer?
- You would require phy/cache-bundle via Composer, register the bundle in Symfony's AppKernel, and configure backends in config.yml. In Laravel, Composer may install the files, but there is no supported way to register or bootstrap the bundle. Installation alone does not make it functional in Laravel.
- How do I configure phy/cache-bundle in Laravel?
- You cannot configure it natively in Laravel. It expects Symfony's DependencyInjection container and app/config/config.yml, neither of which Laravel provides. The practical approach is to map each backend to a Laravel cache driver in config/cache.php.
- What is the Laravel equivalent of phy/cache-bundle's API?
- Illuminate\Cache\Repository is already a common API over heterogeneous backends. It provides get, put, remember, forget, tags where supported, and a Cache::extend hook for missing drivers. You can add APCu support with a small custom driver rather than porting the bundle.
- Is phy/cache-bundle maintained and PHP 8 compatible?
- Adoption is effectively nil, with about 7 stars and zero dependents, and the code is PHP 5-era. It is likely to fail PHP 8 static analysis due to dynamic properties, create_function, and untyped signatures. There is no evidence of CI, a test suite, or a modern composer.json PHP constraint.
- What license does phy/cache-bundle use and can I copy its code?
- It uses OSL-3.0, a reciprocal weak-copyleft license, not MIT or Apache. Internal use is generally fine, but copying code into your codebase can create a derivative work and may require releasing that derivative under OSL-3.0. Get legal counsel before lifting any code.
- What should I use instead of phy/cache-bundle for multi-backend caching in Laravel?
- Use Laravel's native cache drivers: array, file, Redis, Memcached, database, and DynamoDB. If you need a missing backend or automatic local-then-shared tiering, build a small custom driver via Cache::extend in a service provider. That is hours of work versus weeks porting an abandoned Symfony2 bundle.