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 1313
1414use Doctrine \Common \Annotations \Annotation ;
1515use Doctrine \Common \Cache \Cache ;
16+ use Doctrine \DBAL \Connection ;
1617use Symfony \Bundle \FullStack ;
1718use Symfony \Component \Asset \Package ;
1819use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
@@ -882,7 +883,7 @@ private function addCacheSection(ArrayNodeDefinition $rootNode)
882883 ->scalarNode ('default_psr6_provider ' )->end ()
883884 ->scalarNode ('default_redis_provider ' )->defaultValue ('redis://localhost ' )->end ()
884885 ->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 ()
886887 ->arrayNode ('pools ' )
887888 ->useAttributeAsKey ('name ' )
888889 ->prototype ('array ' )
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Bundle \FrameworkBundle \Tests \DependencyInjection ;
1313
14+ use Doctrine \DBAL \Connection ;
1415use PHPUnit \Framework \TestCase ;
1516use Symfony \Bundle \FrameworkBundle \DependencyInjection \Configuration ;
1617use Symfony \Bundle \FullStack ;
@@ -268,7 +269,7 @@ protected static function getBundleDefaultConfig()
268269 'directory ' => '%kernel.cache_dir%/pools ' ,
269270 'default_redis_provider ' => 'redis://localhost ' ,
270271 'default_memcached_provider ' => 'memcached://localhost ' ,
271- 'default_pdo_provider ' => ' doctrine.dbal.default_connection ' ,
272+ 'default_pdo_provider ' => class_exists (Connection::class) ? ' database_connection ' : null ,
272273 ),
273274 'workflows ' => array (
274275 'enabled ' => false ,
You can’t perform that action at this time.
0 commit comments