-
Notifications
You must be signed in to change notification settings - Fork 311
Description
Describe the bug
When running / executing the composer binary inside the InvoiceNinja docker container, it throws an error message:
PHP Fatal error: Declaration of Symfony\Component\Console\Command\HelpCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in phar:///usr/local/bin/composer/vendor/symfony/console/Command/HelpCommand.php on line 70
This problem may be unrelated to the actual invoiceninja build, however its worth to note that the execution of composer
inside the container also does not work for other directories than the application directory at /var/www/html
. After some further digging it also turns out that the scripts:
section of the invoiceninja composer.json is triggering this specific error. When I remove all members of the scripts:
section after the dump autoload command, the composer --version
command works again. But other composer
commands still throws errors.
To reproduce
Steps to reproduce the behavior:
- build the invoiceninja container using this dockerfile.
- try to execute the
composer
command inside the container via a terminal. - error message appears.
Expected behavior
I should be able to use the composer command inside the docker container.
Related issue
composer/composer#12514
Solution
Disable opcache in cli