@@ -299,6 +299,24 @@ protected function buildPHPOpenCV($directory)
299
299
*/
300
300
protected function execute (InputInterface $ input , OutputInterface $ output )
301
301
{
302
+ // 'enable sockets supports? [no] : ';
303
+ //查找php配置
304
+ try {
305
+ $ process = new Process ('which phpize ' );
306
+ $ process ->mustRun ();
307
+ $ phpizePath = str_replace (PHP_EOL , '' , $ process ->getOutput ());
308
+ $ process = new Process ('which php-config ' );
309
+ $ process ->mustRun ();
310
+ $ phpConfigPath = str_replace (PHP_EOL , '' , $ process ->getOutput ());
311
+
312
+ } catch (\Exception $ e ) {
313
+ throw new RuntimeException ($ process ->getErrorOutput ());
314
+ }
315
+ exit ;
316
+ $ output ->writeln ('<comment>Application ready! Build something amazing.</comment> ' );
317
+ $ output ->write ('<comment>Application ready! Build something amazing.</comment> ' );
318
+ $ this ->userInput ();
319
+ exit ;
302
320
$ this ->checkIsRoot ();
303
321
$ this ->checkExtensionIsInstall ($ output );
304
322
$ this ->buildEnvDetection ();
@@ -321,4 +339,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
321
339
322
340
$ output ->writeln ('<comment>Application ready! Build something amazing.</comment> ' );
323
341
}
342
+
343
+
344
+ /**
345
+ * 用户输入
346
+ * @author hihozhou
347
+ * @return string
348
+ */
349
+ protected function userInput ()
350
+ {
351
+ $ input = trim (fgets (STDIN ));
352
+ return $ input ;
353
+ }
324
354
}
0 commit comments