[Cache] Add new cache.adapter.doctrine_dbal#16502
[Cache] Add new cache.adapter.doctrine_dbal#16502Jibbarth wants to merge 1 commit intosymfony:5.4from
Conversation
| # service: cache.pdo | ||
| default_pdo_provider: 'doctrine.dbal.default_connection' | ||
| # service: cache.doctrine_dbal | ||
| default_doctrine_dbal_provider: 'doctrine.dbal.default_connection' |
There was a problem hiding this comment.
I added this here too, as the service cache.default_doctrine_dbal_provider is registered as an alias of service doctrine.dbal.default_connection.
However, i'm not sure to understand properly this part of the doc. As far as i understand, a new pool should be created, named cache.doctrine_dbal, and I should be able to use it, but I don't see such a pool in my list of service.
Did I miss something ?
There was a problem hiding this comment.
https://github.com/symfony/framework-bundle/blob/5.4/DependencyInjection/Configuration.php#L1081
| default_doctrine_dbal_provider: 'doctrine.dbal.default_connection' | |
| default_doctrine_dbal_provider: 'database_connection' |
| @@ -138,6 +143,8 @@ will create pools with service IDs that follow the pattern ``cache.[type]``. | |||
| default_memcached_provider: 'memcached://localhost' | |||
| # service: cache.pdo | |||
| default_pdo_provider: 'doctrine.dbal.default_connection' | |||
There was a problem hiding this comment.
The PDO adapter no longer accept DBAL Connection. This line needs an update too.
There was a problem hiding this comment.
Depends on the availability of "doctrine/dbal": https://github.com/symfony/framework-bundle/blob/5.4/DependencyInjection/Configuration.php#L1082
If available: database_connection
There was a problem hiding this comment.
Isn't the default config missing an update? DBAL doesn't extend PDO anymore, isn't it? So we can't set a default value here (unless we can access the PDO object when we have a DBAL connection?)
Would anyone like to dig this question?
|
Any updates on this? |
|
I'd like to merge this, but there are still some unanswered questions that I can't answer. Maybe @nicolas-grekas can help us here because he knows everything about the cache. Thanks! |
|
@Jibbarth would you be interested in rebasing and finishing this PR? Thanks 🙏 |
|
@javiereguiluz why not. Let me a little time to remember the subject 😅 Still against 5.4 ? |
|
Let's close it, it has been fixed already in #18698 |
|
I'm sorry I didn't double-check this before asking you. Thanks! |
Hi 👋
Mention the new
cache.adapter.doctrine_dbalin the list as a preconfigured adapter.