瀏覽代碼

Fix Fatal error Type json already exists.

Error appeared after recent composer update
jmontoyaa 7 年之前
父節點
當前提交
fa3b459314
共有 1 個文件被更改,包括 6 次插入7 次删除
  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(),