Skip to content

Commit

Permalink
renamed CLI component to Console
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 9, 2010
1 parent 41bc39b commit e9ad851
Show file tree
Hide file tree
Showing 58 changed files with 143 additions and 143 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php

namespace Symfony\Components\CLI;

use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Input\ArgvInput;
use Symfony\Components\CLI\Input\ArrayInput;
use Symfony\Components\CLI\Input\InputDefinition;
use Symfony\Components\CLI\Input\InputOption;
use Symfony\Components\CLI\Input\InputArgument;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\CLI\Output\Output;
use Symfony\Components\CLI\Output\ConsoleOutput;
use Symfony\Components\CLI\Command\Command;
use Symfony\Components\CLI\Command\HelpCommand;
use Symfony\Components\CLI\Command\ListCommand;
namespace Symfony\Components\Console;

use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Input\ArgvInput;
use Symfony\Components\Console\Input\ArrayInput;
use Symfony\Components\Console\Input\InputDefinition;
use Symfony\Components\Console\Input\InputOption;
use Symfony\Components\Console\Input\InputArgument;
use Symfony\Components\Console\Output\OutputInterface;
use Symfony\Components\Console\Output\Output;
use Symfony\Components\Console\Output\ConsoleOutput;
use Symfony\Components\Console\Command\Command;
use Symfony\Components\Console\Command\HelpCommand;
use Symfony\Components\Console\Command\ListCommand;

/*
* This file is part of the symfony framework.
Expand All @@ -27,7 +27,7 @@
/**
* An Application is the container for a collection of commands.
*
* It is the main entry point of a CLI application.
* It is the main entry point of a Console application.
*
* This class is optimized for a standard CLI environment.
*
Expand Down Expand Up @@ -310,7 +310,7 @@ public function getLongVersion()
}
else
{
return '<info>CLI Tool</info>';
return '<info>Console Tool</info>';
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Symfony\Components\CLI\Command;

use Symfony\Components\CLI\Input\InputDefinition;
use Symfony\Components\CLI\Input\InputOption;
use Symfony\Components\CLI\Input\InputArgument;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\CLI\Output\Formatter;
use Symfony\Components\CLI\Application;
namespace Symfony\Components\Console\Command;

use Symfony\Components\Console\Input\InputDefinition;
use Symfony\Components\Console\Input\InputOption;
use Symfony\Components\Console\Input\InputArgument;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;
use Symfony\Components\Console\Output\Formatter;
use Symfony\Components\Console\Application;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace Symfony\Components\CLI\Command;
namespace Symfony\Components\Console\Command;

use Symfony\Components\CLI\Input\InputArgument;
use Symfony\Components\CLI\Input\InputOption;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\CLI\Output\Output;
use Symfony\Components\CLI\Command\Command;
use Symfony\Components\Console\Input\InputArgument;
use Symfony\Components\Console\Input\InputOption;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;
use Symfony\Components\Console\Output\Output;
use Symfony\Components\Console\Command\Command;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace Symfony\Components\CLI\Command;
namespace Symfony\Components\Console\Command;

use Symfony\Components\CLI\Input\InputArgument;
use Symfony\Components\CLI\Input\InputOption;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\CLI\Output\Output;
use Symfony\Components\CLI\Command\Command;
use Symfony\Components\Console\Input\InputArgument;
use Symfony\Components\Console\Input\InputOption;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;
use Symfony\Components\Console\Output\Output;
use Symfony\Components\Console\Command\Command;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Input;
namespace Symfony\Components\Console\Input;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Output;
namespace Symfony\Components\Console\Output;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Output;
namespace Symfony\Components\Console\Output;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Output;
namespace Symfony\Components\Console\Output;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Output;
namespace Symfony\Components\Console\Output;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Output;
namespace Symfony\Components\Console\Output;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\Components\CLI\Output;
namespace Symfony\Components\Console\Output;

/*
* This file is part of the symfony framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Symfony\Components\CLI\Tester;
namespace Symfony\Components\Console\Tester;

use Symfony\Components\CLI\Application;
use Symfony\Components\CLI\Input\ArrayInput;
use Symfony\Components\CLI\Output\StreamOutput;
use Symfony\Components\Console\Application;
use Symfony\Components\Console\Input\ArrayInput;
use Symfony\Components\Console\Output\StreamOutput;

class ApplicationTester
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Symfony\Components\CLI\Tester;
namespace Symfony\Components\Console\Tester;

use Symfony\Components\CLI\Command\Command;
use Symfony\Components\CLI\Input\ArrayInput;
use Symfony\Components\CLI\Output\StreamOutput;
use Symfony\Components\Console\Command\Command;
use Symfony\Components\Console\Input\ArrayInput;
use Symfony\Components\Console\Output\StreamOutput;

class CommandTester
{
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/Symfony/Components/CLI/application_run4.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Symfony\Components\CLI\Command\Command;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\Console\Command\Command;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;

class Foo1Command extends Command
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Symfony\Components\CLI\Command\Command;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\Console\Command\Command;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;

class Foo2Command extends Command
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Symfony\Components\CLI\Command\Command;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\Console\Command\Command;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;

class FooCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Symfony\Components\CLI\Command\Command;
use Symfony\Components\CLI\Input\InputInterface;
use Symfony\Components\CLI\Output\OutputInterface;
use Symfony\Components\Console\Command\Command;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;

class TestCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<info>CLI Tool</info>
<info>Console Tool</info>

<comment>Usage:</comment>
UNKNOWN [options] command [arguments]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<info>CLI Tool</info>
<info>Console Tool</info>

<comment>Usage:</comment>
UNKNOWN [options] command [arguments]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<info>CLI Tool</info>
<info>Console Tool</info>

<comment>Usage:</comment>
UNKNOWN [options] command [arguments]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CLI Tool
Console Tool

Usage:
UNKNOWN [options] command [arguments]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Console Tool
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

require_once __DIR__.'/../../../bootstrap.php';

use Symfony\Components\CLI\Application;
use Symfony\Components\CLI\Input\ArrayInput;
use Symfony\Components\CLI\Output\Output;
use Symfony\Components\CLI\Output\StreamOutput;
use Symfony\Components\CLI\Tester\ApplicationTester;
use Symfony\Components\Console\Application;
use Symfony\Components\Console\Input\ArrayInput;
use Symfony\Components\Console\Output\Output;
use Symfony\Components\Console\Output\StreamOutput;
use Symfony\Components\Console\Tester\ApplicationTester;

$fixtures = __DIR__.'/../../../../fixtures/Symfony/Components/CLI';
$fixtures = __DIR__.'/../../../../fixtures/Symfony/Components/Console';

require_once $fixtures.'/FooCommand.php';
require_once $fixtures.'/Foo1Command.php';
Expand Down Expand Up @@ -57,7 +57,7 @@
$t->diag('->getCommands()');
$application = new Application();
$commands = $application->getCommands();
$t->is(get_class($commands['help']), 'Symfony\\Components\\CLI\\Command\\HelpCommand', '->getCommands() returns the registered commands');
$t->is(get_class($commands['help']), 'Symfony\\Components\\Console\\Command\\HelpCommand', '->getCommands() returns the registered commands');

$application->addCommand(new FooCommand());
$commands = $application->getCommands('foo');
Expand Down Expand Up @@ -113,7 +113,7 @@ public function setWantHelps()
$application->addCommand($foo = new FooCommand());
$application->setWantHelps();
$command = $application->getCommand('foo:bar');
$t->is(get_class($command), 'Symfony\Components\CLI\Command\HelpCommand', '->getCommand() returns the help command if --help is provided as the input');
$t->is(get_class($command), 'Symfony\Components\Console\Command\HelpCommand', '->getCommand() returns the help command if --help is provided as the input');

// ->getNamespaces()
$t->diag('->getNamespaces()');
Expand Down Expand Up @@ -155,7 +155,7 @@ public function setWantHelps()
$application = new TestApplication();
$application->addCommand(new FooCommand());
$t->is(get_class($application->findCommand('foo:bar')), 'FooCommand', '->findCommand() returns a command if its name exists');
$t->is(get_class($application->findCommand('h')), 'Symfony\Components\CLI\Command\HelpCommand', '->findCommand() returns a command if its name exists');
$t->is(get_class($application->findCommand('h')), 'Symfony\Components\Console\Command\HelpCommand', '->findCommand() returns a command if its name exists');
$t->is(get_class($application->findCommand('f:bar')), 'FooCommand', '->findCommand() returns a command if the abbreviation for the namespace exists');
$t->is(get_class($application->findCommand('f:b')), 'FooCommand', '->findCommand() returns a command if the abbreviation for the namespace and the command name exist');
$t->is(get_class($application->findCommand('a')), 'FooCommand', '->findCommand() returns a command if the abbreviation exists for an alias');
Expand Down Expand Up @@ -255,8 +255,8 @@ public function setWantHelps()
$application->run();
ob_end_clean();

$t->is(get_class($command->input), 'Symfony\Components\CLI\Input\ArgvInput', '->run() creates an ArgvInput by default if none is given');
$t->is(get_class($command->output), 'Symfony\Components\CLI\Output\ConsoleOutput', '->run() creates a ConsoleOutput by default if none is given');
$t->is(get_class($command->input), 'Symfony\Components\Console\Input\ArgvInput', '->run() creates an ArgvInput by default if none is given');
$t->is(get_class($command->output), 'Symfony\Components\Console\Output\ConsoleOutput', '->run() creates a ConsoleOutput by default if none is given');

$application = new Application();
$application->setAutoExit(false);
Expand Down
Loading

0 comments on commit e9ad851

Please sign in to comment.