Skip to content

Commit 9e8696b

Browse files
committed
Remove php-mode option
1 parent 94ed3e9 commit 9e8696b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/N98/Magento/Command/Developer/ConsoleCommand.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ protected function configure()
5353
->setName('dev:console')
5454
->addOption('area', 'a', InputOption::VALUE_REQUIRED, 'Area to initialize')
5555
->addOption('auto-exit', 'e', InputOption::VALUE_NONE, 'Automatic exit after cmd')
56-
->addOption('cmd-is-php', 'p', InputOption::VALUE_NONE, 'Use CMD argument as PHP script')
5756
->addArgument('cmd', InputArgument::OPTIONAL, 'Direct code to run', '')
5857
->setDescription(
5958
'Opens PHP interactive shell with a initialized Magento application</comment>'
@@ -169,23 +168,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
169168
if ($cmd === '-') {
170169
$cmd = 'php://stdin';
171170
$cmd = @\file_get_contents($cmd);
171+
if (OutputInterface::VERBOSITY_DEBUG <= $output->getVerbosity()) {
172+
$output->writeln('<info>read commands from stdin</info>');
173+
}
172174
}
173175

174176
if (!empty($cmd)) {
175-
if ($input->getOption('cmd-is-php')) {
176-
$shell->setOutput($consoleOutput);
177-
178-
return $shell->execute($cmd);
179-
}
180-
181177
// Remove quotes possibly passed by command line
182178
$cmd = trim($cmd, '"\'');
183179

184180
$cmd = $this->filterCmdCode($cmd);
185181
$code = preg_split('/[\n;]+/', $cmd);
186182

187183
if ($input->getOption('auto-exit')) {
188-
$code[] = 'exit';
184+
$input->setInteractive(false);
189185
}
190186

191187
$code = array_filter($code, function ($line) {

0 commit comments

Comments
 (0)