We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test on Symfony 4.4.21.
After installing symfony-swap and his dependencies, i created a custom cache provider in the same way than recommanded at https://github.com/florianv/swap/blob/master/doc/readme.md#cacheby using a PRedis Client.
I used it after in the same way than https://github.com/florianv/symfony-swap/blob/master/Resources/doc/index.md.
This is the configuration i have : config/services.yaml :
services: # Create a psr-6 CachePool with our Predis Client redis.cache_pool: class: Cache\Adapter\Predis\PredisCachePool arguments: $cache: "@snc_redis.default" # Create a psr-16 CacheInterface redis.psr16.adapter: class: Cache\Bridge\SimpleCache\SimpleCacheBridge arguments: $cacheItemPool: "@redis.cache_pool" # Autowire Swap\Swap: "@florianv_swap.swap" Cache\Bridge\SimpleCache\SimpleCacheBridge: "@redis.psr16.adapter"
config/packages/florianv_swap.yaml :
florianv_swap: cache: ttl: 86400 type: redis.psr16.adapter # "redis.psr16.adapter" or "@redis.psr16.adapter" don't work either providers: european_central_bank: ~
I got this error :
Unexpected swap cache type 'redis.psr16.adapter" at florianv/swap-bundle/DependencyInjection/FlorianvSwapExtension.php line 116
it look like that the $container as no definition for the "redis.psr16.adapter" in FlorianvSwapExtension on line 108.
How to fix this error ?
Additional clarification, when i build a new Swap with the custom cache : it's working well
$swap = (new Builder(['cache_ttl' => 3600, 'cache_key_prefix' => 'myapp-'])) ->add('european_central_bank', []) ->useSimpleCache($simpleCacheBridge) // $simpleCacheBridge : Cache\Bridge\SimpleCache\SimpleCacheBridge ->build();
The text was updated successfully, but these errors were encountered:
Same problem here.
Sorry, something went wrong.
Hi, this is due to this condition here: https://github.com/florianv/symfony-swap/blob/master/DependencyInjection/FlorianvSwapExtension.php#L83 and here: https://github.com/florianv/symfony-swap/blob/master/DependencyInjection/FlorianvSwapExtension.php#L108
In case you'd like to debug the issue ;) Thanks!
Successfully merging a pull request may close this issue.
Test on Symfony 4.4.21.
After installing symfony-swap and his dependencies, i created a custom cache provider in the same way than recommanded at https://github.com/florianv/swap/blob/master/doc/readme.md#cacheby using a PRedis Client.
I used it after in the same way than https://github.com/florianv/symfony-swap/blob/master/Resources/doc/index.md.
This is the configuration i have :
config/services.yaml :
config/packages/florianv_swap.yaml :
I got this error :
it look like that the $container as no definition for the "redis.psr16.adapter" in FlorianvSwapExtension on line 108.
How to fix this error ?
Additional clarification, when i build a new Swap with the custom cache : it's working well
The text was updated successfully, but these errors were encountered: