@@ -53,7 +53,6 @@ protected function configure()
53
53
->setName ('dev:console ' )
54
54
->addOption ('area ' , 'a ' , InputOption::VALUE_REQUIRED , 'Area to initialize ' )
55
55
->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 ' )
57
56
->addArgument ('cmd ' , InputArgument::OPTIONAL , 'Direct code to run ' , '' )
58
57
->setDescription (
59
58
'Opens PHP interactive shell with a initialized Magento application</comment> '
@@ -169,23 +168,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
169
168
if ($ cmd === '- ' ) {
170
169
$ cmd = 'php://stdin ' ;
171
170
$ cmd = @\file_get_contents ($ cmd );
171
+ if (OutputInterface::VERBOSITY_DEBUG <= $ output ->getVerbosity ()) {
172
+ $ output ->writeln ('<info>read commands from stdin</info> ' );
173
+ }
172
174
}
173
175
174
176
if (!empty ($ cmd )) {
175
- if ($ input ->getOption ('cmd-is-php ' )) {
176
- $ shell ->setOutput ($ consoleOutput );
177
-
178
- return $ shell ->execute ($ cmd );
179
- }
180
-
181
177
// Remove quotes possibly passed by command line
182
178
$ cmd = trim ($ cmd , '" \'' );
183
179
184
180
$ cmd = $ this ->filterCmdCode ($ cmd );
185
181
$ code = preg_split ('/[\n;]+/ ' , $ cmd );
186
182
187
183
if ($ input ->getOption ('auto-exit ' )) {
188
- $ code [] = ' exit ' ;
184
+ $ input -> setInteractive ( false ) ;
189
185
}
190
186
191
187
$ code = array_filter ($ code , function ($ line ) {
0 commit comments