diff --git a/ConnectionFactory.php b/ConnectionFactory.php index a2a41380d..a30c3f77c 100644 --- a/ConnectionFactory.php +++ b/ConnectionFactory.php @@ -84,6 +84,11 @@ private function initializeTypes() Type::addType($type, $typeConfig['class']); } if ($typeConfig['commented']) { + @trigger_error( + 'The commented option of the type configuration is deprecated since DoctrineBundle 1.7.' . + 'Use the feature of the Type class Instead', + E_USER_DEPRECATED + ); $this->commentedTypes[] = $type; } } diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 12365fd10..a3c653984 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -97,7 +97,7 @@ private function addDbalSection(ArrayNodeDefinition $node) ->end() ->children() ->scalarNode('class')->isRequired()->end() - ->booleanNode('commented')->defaultTrue()->end() + ->booleanNode('commented')->defaultFalse()->end() ->end() ->end() ->end() diff --git a/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php b/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php index 93d9a12a2..fb0a86762 100644 --- a/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php +++ b/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php @@ -531,7 +531,7 @@ public function testSetTypes() $container = $this->loadContainer('dbal_types'); $this->assertEquals( - array('test' => array('class' => TestType::class, 'commented' => true)), + array('test' => array('class' => TestType::class, 'commented' => false)), $container->getParameter('doctrine.dbal.connection_factory.types') ); $this->assertEquals('%doctrine.dbal.connection_factory.types%', $container->getDefinition('doctrine.dbal.connection_factory')->getArgument(0));