Progamatically running Satis commands pita
- Dominant language
- PHP
- Stars
- 3.3k
- Forks
- 530
- Avg merge
- 6h 53m
- Merged PRs (30d)
- 13
Description
Symfony allows something like this:
```
$app = new Application();
$app->find('build')->run(...);
```
to run a command within another ( see https://symfony.com/doc/current/console/calling_commands.html ).
Unfortunately this is not possible with Satis because `::run()` depends on the properties `\Composer\Satis\Console\Application::$io` and/or `\Composer\Satis\Console\Application::$composer` to be initialized already.
Those two are initialized in `\Composer\Satis\Console\Application::doRun()`. But doing `$app->doRun(...)` is a bad solution because it exits (like an `exit() || die()`) after executing. Except you set `\Composer\Satis\Console\Application::$autoExit = false`. And if you feel confused now, then you also feel what the problem is.
So please initialize the two properties a bit earlier so that Satis can be used extended that way.
Contributor guide
Assessment
This issue has not been assessed yet.