Search code examples
composer-phpwamp7zip

7-zip unavailable / timeout


I have a local Composer installation (Windows 10, Composer 2.5.8 up-to-date,"C:\ProgramData\ComposerSetup\bin" added to $PATH, as well as C:\wamp64\bin\php\php8.2.0) and I keep getting this error when using certain composer commands on my terminal (Cmder), i.e "composer update" on a localhost Drupal 9 project :


In Process.php line 1204:

The process ""C:\Program Files\7-Zip\7z.EXE" x -bb0 -y C:\w
amp64\www\BDV-dev\vendor\composer\tmp-e8f98dc9f37c550099b83
c482cb9eae9 -oC:\wamp64\www\*****\vendor\composer\3ad6f7c
4" exceeded the timeout of 300 seconds.

When running "composer diagnose", here is what I get:

Checking platform settings: OK                                  
Checking git settings: OK git version 2.31.1                    
Checking http connectivity to packagist: OK                     
Checking https connectivity to packagist: OK                    
Checking github.com rate limit: OK                              
Checking disk free space: OK                                    
Checking pubkeys:                                               
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0
  87719BA6 8F3BB723 4E5D42D0 84A14642                           
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 
 0C708369 153E328C AD90147D AFE50952                            
OK                                                              
Checking composer version: OK                                   
Composer version: 2.5.8                                         
PHP version: 8.2.0                                              
PHP binary path: C:\wamp64\bin\php\php8.2.0\php.exe             
OpenSSL version: OpenSSL 3.0.7 1 Nov 2022                       
cURL version: 7.85.0 libz 1.2.12 ssl OpenSSL/3.0.7              
zip: extension present, unzip not available, 7-Zip present (7z) 

I have tried to add 7-zip to $PATH and remove / reinstall 7-Zip and Composer but it didn't change anything... I have switched from Xampp to Wamp in order to set PHP 8.2.0 with zip extension enabled.

I have been stuck with this for several days, searched topics but can't find anything related to this issue.

Thank you for your help! Clément


Solution

  • I have followed what I found on this post:

    Editing composer.json in order to disable the process timeout.

    I also performed the command

    composer install --prefer-dist --no-dev
    

    which allowed me to successfully update my Drupal 9 project.