8000 bug #45637 [Cache] do not pass DBAL connections to PDO adapters (xabbuh) · symfony/symfony@7cecf52 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7cecf52

Browse files
bug #45637 [Cache] do not pass DBAL connections to PDO adapters (xabbuh)
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
2 parents 4ae613e + 1027465 commit 7cecf52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Psr\Log\LogLevel;
1919
use Symfony\Bundle\FullStack;
2020
use Symfony\Component\Asset\Package;
21+
use Symfony\Component\Cache\Adapter\DoctrineAdapter;
2122
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
2223
use Symfony\Component\Config\Definition\Builder\NodeBuilder;
2324
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@@ -1078,7 +1079,7 @@ private function addCacheSection(ArrayNodeDefinition $rootNode, callable $willBe
10781079
->scalarNode('default_redis_provider')->defaultValue('redis://localhost')->end()
10791080
->scalarNode('default_memcached_provider')->defaultValue('memcached://localhost')->end()
10801081
->scalarNode('default_doctrine_dbal_provider')->defaultValue('database_connection')->end()
1081-
->scalarNode('default_pdo_provider')->defaultValue($willBeAvailable('doctrine/dbal', Connection::class) ? 'database_connection' : null)->end()
1082+
->scalarNode('default_pdo_provider')->defaultValue($willBeAvailable('doctrine/dbal', Connection::class) && class_exists(DoctrineAdapter::class) ? 'database_connection' : null)->end()
10821083
->arrayNode('pools')
10831084
->useAttributeAsKey('name')
10841085
->prototype('array')

0 commit comments

Comments
 (0)
0