Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with composer v2.3 #16

Open
alexpozzi opened this issue Apr 7, 2022 · 0 comments
Open

Issue with composer v2.3 #16

alexpozzi opened this issue Apr 7, 2022 · 0 comments

Comments

@alexpozzi
Copy link

Hello,
I'm trying to use this package in combination with composer v2.3 and I get the following error when launching the warmup-opcode command.

In PhpServerCompiler.php line 33:
                                                              
  [Error]                                                     
  Class "Symfony\Component\Process\ProcessBuilder" not found  
                                                              

Exception trace:
  at /home/docker/composer/vendor/jderusse/composer-warmup/src/Compiler/PhpServerCompiler.php:33
 Jderusse\Warmup\Compiler\PhpServerCompiler->startServer() at /home/docker/composer/vendor/jderusse/composer-warmup/src/Compiler/PhpServerCompiler.php:23
 Jderusse\Warmup\Compiler\PhpServerCompiler->__construct() at /home/docker/composer/vendor/jderusse/composer-warmup/src/Console/WarmupCommand.php:67
 Jderusse\Warmup\Console\WarmupCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:1015
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:334
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:130
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:83
 require() at /usr/bin/composer:29

warmup-opcode [<extra>...]

It seems to be related to the fact that composer v2.3 requires symfony/process version of at least v5.4.0 which does not include anymore the Symfony\Component\Process\ProcessBuilder class.

If it's fine with you I can create a PR to refactor the pieces of code that are using the process builder and try to support both symfony/process <4.0 and >=4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant