1

when i try to install swagger package i got this warrning

Failed to download swagger-api/swagger-ui from dist: The zip extension and unzip/7z commands are both missing, skipping. The php.ini used by your command-line PHP is: D:\xampp\php\php.ini Now trying to download from source

and after a while i got this error

In Process.php line 1204: The process "git clone --no-checkout -- https://github.com/swagger-api/swagger-ui.git D:\xampp\htdocs\laravel-10\vendor\swagger-api\swagger-ui && c
d /D D:\xampp\htdocs\laravel-10\vendor\swagger-api\swagger-ui && git remote add composer -- https://github.com/swagger-api/swagger-ui.git && git fe
tch composer && git remote set-url origin -- https://github.com/swagger-api/swagger-ui.git && git remote set-url composer -- https://github.com/swa
gger-api/swagger-ui.git" exceeded the timeout of 300 seconds.

Nico Haase
  • 11,420
  • 35
  • 43
  • 69
  • Does this answer your question? [PHP error: "The zip extension and unzip command are both missing, skipping."](https://stackoverflow.com/questions/41274829/php-error-the-zip-extension-and-unzip-command-are-both-missing-skipping) – Nico Haase May 08 '23 at 08:02
  • Please don't use tags that are not connected to the given problem. You haven't shared any code related to Laravel or Swagger – Nico Haase May 08 '23 at 08:03

1 Answers1

0

You have two issues here.

  1. ZIP extension is missing. (The zip extension and unzip/7z commands are both missing, skipping)
  2. Composer timeout. (exceeded the timeout of 300 seconds.)

For first error

  1. Open your php.ini file(D:\xampp\php\php.ini).
  2. Find ;extension=zip and remove the semicolon at the beginning.
  3. Save and restart your XAMPP.

Install https://www.7-zip.org/ if required

For the second issue

composer config --global process-timeout 600
Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85