File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use Doctrine \Common \Annotations \Annotation ;
15
15
use Doctrine \Common \Cache \Cache ;
16
+ use Doctrine \DBAL \Connection ;
16
17
use Symfony \Bundle \FullStack ;
17
18
use Symfony \Component \Asset \Package ;
18
19
use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
@@ -882,7 +883,7 @@ private function addCacheSection(ArrayNodeDefinition $rootNode)
882
883
->scalarNode ('default_psr6_provider ' )->end ()
883
884
->scalarNode ('default_redis_provider ' )->defaultValue ('redis://localhost ' )->end ()
884
885
->scalarNode ('default_memcached_provider ' )->defaultValue ('memcached://localhost ' )->end ()
885
- ->scalarNode ('default_pdo_provider ' )->defaultValue (' doctrine.dbal.default_connection ' )->end ()
886
+ ->scalarNode ('default_pdo_provider ' )->defaultValue (class_exists (Connection::class) ? ' database_connection ' : null )->end ()
886
887
->arrayNode ('pools ' )
887
888
->useAttributeAsKey ('name ' )
888
889
->prototype ('array ' )
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \DependencyInjection ;
13
13
14
+ use Doctrine \DBAL \Connection ;
14
15
use PHPUnit \Framework \TestCase ;
15
16
use Symfony \Bundle \FrameworkBundle \DependencyInjection \Configuration ;
16
17
use Symfony \Bundle \FullStack ;
@@ -268,7 +269,7 @@ protected static function getBundleDefaultConfig()
268
269
'directory ' => '%kernel.cache_dir%/pools ' ,
269
270
'default_redis_provider ' => 'redis://localhost ' ,
270
271
'default_memcached_provider ' => 'memcached://localhost ' ,
271
- 'default_pdo_provider ' => ' doctrine.dbal.default_connection ' ,
272
+ 'default_pdo_provider ' => class_exists (Connection::class) ? ' database_connection ' : null ,
272
273
),
273
274
'workflows ' => array (
274
275
'enabled ' => false ,
You can’t perform that action at this time.
0 commit comments