Skip to content

Commit

Permalink
deprecated the Shell Console class
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 26, 2015
1 parent 6f7aae9 commit 1c17928
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========

2.8.0
-----

* Deprecated the Shell

2.7.0
-----

Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/Console/Application.php
Expand Up @@ -86,6 +86,8 @@ public function doRun(InputInterface $input, OutputInterface $output)
$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();
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/Console/Shell.php
Expand Up @@ -16,6 +16,8 @@
/**
* Shell.
*
* @deprecated since version 2.8, to be removed in 3.0.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Shell extends BaseShell
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/Console/Shell.php
Expand Up @@ -23,6 +23,8 @@
* 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>
*/
Expand All @@ -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();
Expand Down

0 comments on commit 1c17928

Please sign in to comment.