Browse Source

Fix Fatal error Type json already exists.

Error appeared after recent composer update
jmontoyaa 7 years ago
parent
commit
fa3b459314
1 changed files with 6 additions and 7 deletions
  1. 6 7
      bin/doctrine.php

+ 6 - 7
bin/doctrine.php

@@ -1,6 +1,10 @@
 <?php
 /* For licensing terms, see /license.txt */
 
+use Doctrine\ORM\Tools\Console\ConsoleRunner;
+use Symfony\Component\Console\Helper\HelperSet;
+use Doctrine\DBAL\Types\Type;
+
 /**
  * Very useful script in order to create a Migration file based in the
  * current differences of the database:
@@ -15,11 +19,6 @@
  *
  **/
 
-
-use Doctrine\ORM\Tools\Console\ConsoleRunner;
-use Symfony\Component\Console\Helper\HelperSet;
-use Doctrine\DBAL\Types\Type;
-
 (@include_once __DIR__.'/../vendor/autoload.php') || @include_once __DIR__.'/../../../autoload.php';
 
 $directories = array(getcwd(), getcwd().DIRECTORY_SEPARATOR.'config');
@@ -48,10 +47,10 @@ Type::overrideType(
     Database::getUTCDateTimeTypeClass()
 );
 
-Type::addType(
+/*Type::addType(
     'json',
     'Sonata\Doctrine\Types\JsonType'
-);
+);*/
 
 $commands = array(
     new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),