Failed to download phpstan/phpstan from dist: The zip extension and unzip/7z commands are both missing, skipping.

Llevo varias horas pegandome con este error, y es lo que pasa cuando no terminas de leer, al ejecutar:
composer require drupal/upgrade_status
Acaba devolviendome este error:

The process «git clone –no-checkout — https://github.com/phpstan/phpstan.
git C:\xampp82\htdocs\XXXXXXXXXXX*\vendor\phpstan\phpstan && cd /D C:\xampp
82\htdocs\XXXXXXXXXXXXXX*\vendor\phpstan\phpstan && git remote add composer —
https://github.com/phpstan/phpstan.git && git fetch composer && git remote
set-url origin — https://github.com/phpstan/phpstan.git && git remote set
-url composer — https://github.com/phpstan/phpstan.git» exceeded the timeout of 300 seconds.
*Oculto el proyecto por respeto a mi cliente.
Y si el error es este último, que dice que recibimos un timeout desde github al descargar phpstan, pero si nos fijamos en el warning al comienzo avisa que encuentra phpstan y que falla al descargarlo porque no tenemos forma de descomprimir el ZIP, así que se va a la alternativa.
Bien, pues ese es el problema que nuestro sistema no tiene forma de descomprimir el ZIP, pero solucionarlo es tan sencillo como habilitar la extensión en nuestro «php.ini»

Para habilitar esta extensión tan solo debemos ir hasta nuestro php.ini, en mi caso lo tengo en: C:\xampp82\php\php.ini lo abrimos con el bloc de notas y buscamos «zip», debemos quitar el punto y coma «;» de delante, guardar y reiniciar apache, y zas!! instalado


Apasionado de la montaña, del SEO y la programación a partes iguales, llevo más de 20 años trabajando en distintos sectores, pero siempre enfocado a la web, si quieres saber más de mí, sigue el enlace.