-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
The Story
$ vendor/bin/castor compile my-app.linux.phar -v
...
In CompileCommand.php line 287:
[ErrorException]
Warning: Trying to access array offset on null
The Offending Code
$p = new Process([\PHP_BINARY, $input->getArgument('phar-path'), 'list', '--format', 'json']);
$p->mustRun();
$appName = json_decode($p->getOutput(), true)['application']['name'];
The Debugging
The process output has
- valid JSON
- Deprecation warning when repacking a PHAR with Castor (Symfony Console 7.4 add() deprecation) #772 warnings before it
The deeper problem
Fixing #772 will fix the problem, but it may be only a bandaid for a deeper problem: That warnings go to stdout and not stderr, torpedoing output parsing.
Metadata
Metadata
Assignees
Labels
No labels