feature #15892 deprecated the Shell Console class (fabpot)

This PR was merged into the 2.8 branch.

Discussion
----------

deprecated the Shell Console class

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | one of #11742
| License       | MIT
| Doc PR        | n/a

Commits
-------

1c17928 deprecated the Shell Console class
This commit is contained in:
Fabien Potencier 2015-09-26 09:27:31 +02:00
commit 7079aa9e96
4 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
2.8.0
-----
* Deprecated the Shell
2.7.0
-----

View File

@ -86,6 +86,8 @@ class Application extends BaseApplication
$this->setDispatcher($container->get('event_dispatcher'));
if (true === $input->hasParameterOption(array('--shell', '-s'))) {
@trigger_error('The "--shell" option is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
$shell = new Shell($this);
$shell->setProcessIsolation($input->hasParameterOption(array('--process-isolation')));
$shell->run();

View File

@ -16,6 +16,8 @@ use Symfony\Component\Console\Shell as BaseShell;
/**
* Shell.
*
* @deprecated since version 2.8, to be removed in 3.0.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Shell extends BaseShell

View File

@ -23,6 +23,8 @@ use Symfony\Component\Process\PhpExecutableFinder;
* Support for history and completion only works with a PHP compiled
* with readline support (either --with-readline or --with-libedit)
*
* @deprecated since version 2.8, to be removed in 3.0.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Martin Hasoň <martin.hason@gmail.com>
*/
@ -44,6 +46,8 @@ class Shell
*/
public function __construct(Application $application)
{
@trigger_error('The '.__CLASS__.' class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
$this->hasReadline = function_exists('readline');
$this->application = $application;
$this->history = getenv('HOME').'/.history_'.$application->getName();