What would be the difference between running a Symfony console command programatically using:
1-
$command = $this->console.'swiftmailer:spool:send > output.log 2> out.log &';
$process = new SymfonyComponentProcess($command);
$process->run();
2-
$application = new SymfonyBundleFrameworkBundleConsoleApplication($kernel);
$application->setAutoExit(false);
$payload = ['command' => 'swiftmailer:spool:send'];
$input = new SymfonyComponentConsoleInputArrayInput($payload);
$output = new SymfonyComponentConsoleOutputBufferedOutput();
$application->run($input, $output);
I know in terms of handling the results is different but apart from that is there any other technological difference?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…