Commit 2fbc766d authored by romanb's avatar romanb

[2.0][DDC-82] Fixed CLI problems introduced by changeset 6582.

parent 94569baa
......@@ -167,7 +167,7 @@ class Cli
// Check if task exists
if (isset($this->_tasks[$taskName]) && class_exists($this->_tasks[$taskName], true)) {
// Initializing EntityManager
$em = $this->_initializeEntityManager($processedArgs);
$em = $this->_initializeEntityManager($processedArgs, $taskArguments);
// Instantiate and execute the task
$task = new $this->_tasks[$taskName]();
......@@ -322,7 +322,7 @@ class Cli
* @param array CLI Task arguments
* @return EntityManager
*/
private function _initializeEntityManager(& $args)
private function _initializeEntityManager(array $args, array &$taskArgs)
{
// Initialize EntityManager
$configFile = ( ! isset($args['config'])) ? './cli-config.php' : $args['config'];
......@@ -341,7 +341,7 @@ class Cli
// Check for gloal argument options here
if (isset($globalArguments)) {
// Merge arguments. Values specified via the CLI take preference.
$args = array_merge($globalArguments, $args);
$taskArgs = array_merge($globalArguments, $taskArgs);
}
return $em;
......
......@@ -79,10 +79,6 @@ class ClearCacheTask extends AbstractTask
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$printer = $this->getPrinter();
$args = $this->getArguments();
......
......@@ -90,10 +90,6 @@ class ConvertMappingTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();
......
......@@ -52,10 +52,6 @@ class GenerateProxiesTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();
......
......@@ -77,10 +77,6 @@ class RunDqlTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();
......
......@@ -83,10 +83,6 @@ class RunSqlTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();
......
......@@ -99,10 +99,6 @@ class SchemaToolTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();
......
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