You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to add some cache on my database, and try the pdo adapter.
As the doctrine_dbal wasn't yet mentionned in the doc (fixed here), I added the cache.adapter.pdo in a new pool, fetch this pool in a service and try to use it. Got an error while the adapter try to initialize :
How to reproduce
Create a little project
composer create-project symfony/skeleton cacheIssue
cd cacheIssue
composer req orm
Change the default value of default_pdo_provider, whereas I'm not sure what to put here by default if we can't pass anymore the doctrine Connection.
Additional Context
I'm aware now that my mistake was to use this adapter instead cache.adapter.doctrine_dbal in such context, but I think the remaining link between doctrine connection and this pdo adapter should not longer be here by default.
The text was updated successfully, but these errors were encountered:
This PR was merged into the 5.4 branch.
Discussion
----------
[Cache] do not pass DBAL connections to PDO adapters
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#45407
| License | MIT
| Doc PR |
Commits
-------
1027465 do not pass DBAL connections to PDO adapters
Symfony version(s) affected
6.0
Description
Hi π
I wanted to add some cache on my database, and try the pdo adapter.
As the
doctrine_dbal
wasn't yet mentionned in the doc (fixed here), I added thecache.adapter.pdo
in a new pool, fetch this pool in a service and try to use it. Got an error while the adapter try to initialize :How to reproduce
Create a little project
Config the cache
Use it in a new commmand
And run it
Possible Solution
Change the default value of
default_pdo_provider
, whereas I'm not sure what to put here by default if we can't pass anymore the doctrine Connection.Additional Context
I'm aware now that my mistake was to use this adapter instead
cache.adapter.doctrine_dbal
in such context, but I think the remaining link between doctrine connection and this pdo adapter should not longer be here by default.The text was updated successfully, but these errors were encountered: