laminas/laminas-cache-storage-deprecated-factory
laminas-* components. It bridges the gap between legacy Laminas\Cache\StorageFactory (v2.x) and laminas-cache v3.x, enabling incremental modernization without disrupting existing integrations. Critical for monolithic apps or microservices where full refactoring is costly.laminas-cache v2.x.Illuminate\Cache), but may be useful if you’re replacing legacy caching layers with Laminas Cache v3.x.laminas-servicemanager). Evaluate whether the migration effort justifies the temporary benefit.laminas-cache:^3.0 (not v4+). If your app isn’t already on v3.x, this package does not replace the v2→v3 upgrade—it’s a post-v3.x stopgap.laminas-servicemanager and laminas-stdlib, which may conflict with existing Laravel service containers if not properly namespaced.StorageFactory v2.x—test edge cases (e.g., cache tags, metadata handling).laminas-cache v3.x, replacing the factory is a one-line change.DeprecatedFactory (temporary bridge).laminas-cache v4.x if your use case allows, as v4.x may offer better Laravel compatibility.laminas-* components migrate to v3.x. Plan for v4.x adoption post-migration.DeprecatedFactory may not replicate all v2.x quirks (e.g., error handling, edge-case adapter behavior). Requires comprehensive integration tests.laminas-cache v2.x that prevent upgrading to v3.x?laminas-* components support v3.x.Illuminate\Cache or a third-party adapter (e.g., predis/predis for Redis) to reduce Laminas dependency?DeprecatedFactory to a custom interface in Laravel’s container.// app/Providers/AppServiceProvider.php
public function register()
{
$this->app->bind(
\Laminas\Cache\Storage\FactoryInterface::class,
\Laminas\Cache\Storage\DeprecatedFactory::class
);
}
CacheLaminas::factory()).new \Laminas\Cache\StorageFactory() with new \Laminas\Cache\Storage\DeprecatedFactory() in all files.setServiceLocator() calls).grep -r "Laminas\\Cache\\StorageFactory" . to find all usages.laminas-cache v3.x:
composer.json:
"require": {
"laminas/laminas-cache": "^3.0"
}
StorageFactory instantiations with DeprecatedFactory.// Before
$factory = new \Laminas\Cache\StorageFactory();
$adapter = $factory->createService([
'adapter' => 'redis',
'host' => 'redis.example.com',
]);
// After
$factory = new \Laminas\Cache\Storage\DeprecatedFactory();
$adapter = $factory->createService([
'adapter' => 'redis',
'host' => 'redis.example.com',
]);
How can I help you explore Laravel packages today?