Fix Fatal error Type json already exists.

Error appeared after recent composer update
pull/2487/head
jmontoyaa 8 years ago
parent 919a41b37c
commit fa3b459314
  1. 13
      bin/doctrine.php

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

Loading…
Cancel
Save