Commit e4d8efa3 authored by Guilherme Blanco's avatar Guilherme Blanco

[2.0] Couple of fixes to new Console implementation

parent b0e26fa1
......@@ -38,7 +38,7 @@ class Version
/**
* Current Doctrine Version
*/
const VERSION = '2.0 ALPHA 4';
const VERSION = '2.0-DEV';
/**
* Compares a Doctrine version with the current one.
......
......@@ -76,8 +76,7 @@ EOT
}
if (preg_match('/^select/i', $sql)) {
$stmt = $conn->execute($sql);
$resultSet = $stmt->fetchAll(\Doctrine\DBAL\Connection::FETCH_ASSOC);
$resultSet = $conn->fetchAll($sql);
} else {
$resultSet = $em->getConnection()->executeUpdate($sql);
}
......
......@@ -117,7 +117,7 @@ EOT
$query->setMaxResult((int) $maxResult);
}
$resultSet = $query->execute(array(), $hydrationMode);
$resultSet = $query->execute(array(), constant($hydrationMode));
\Doctrine\Common\Util\Debug::dump($resultSet, $input->getOption('depth'));
}
......
......@@ -76,7 +76,7 @@ EOT
{
$em = $this->getHelper('em')->getEntityManager();
$reader = new ClassMetadataReader();
$reader = new \Doctrine\ORM\Tools\ClassMetadataReader();
$reader->setEntityManager($em);
// Process source directories
......
......@@ -77,7 +77,7 @@ EOT
{
$em = $this->getHelper('em')->getEntityManager();
$reader = new ClassMetadataReader();
$reader = new \Doctrine\ORM\Tools\ClassMetadataReader();
$reader->setEntityManager($em);
// Process source directories
......
......@@ -82,7 +82,7 @@ EOT
{
$em = $this->getHelper('em')->getEntityManager();
$reader = new ClassMetadataReader();
$reader = new \Doctrine\ORM\Tools\ClassMetadataReader();
$reader->setEntityManager($em);
// Process source directories
......
<?php
#
# This configuration file is loaded by the Doctrine CLI whenever you execute
# a task. A CLI configuration file usually initializes two local variables:
#
# $em - An EntityManager instance that the CLI tasks should use.
# $globalArguments - An array of default command line arguments that are passed to all
# CLI tasks automatically when an argument is not specifically set on
# the command line.
#
# You can create several CLI configuration files with different names, for different databases.
# Every CLI task recognizes the --config=<path> option where you can specify the configuration
# file to use for a particular task. If this option is not given, the CLI looks for a file
# named "cli-config.php" (this one) in the same directory and uses that by default.
#
require_once __DIR__ . '/../../lib/Doctrine/Common/ClassLoader.php';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment