Composerで[The zip extension and unzip/7z commands are both missing]エラー解消対応 Windows環境

Laravel

Composerでパッケージを入手しようとした場合、zip extensionが見つからないとのエラーが出た時の対処法を説明します。
エラー内容:

Failed to download psr/container from dist: The zip extension and unzip/7z commands are both missing, skipping.                                           
The php.ini used by your command-line PHP is: C:\php\php.ini                   
    Now trying to download from source
image.png
C:\Windows\System32>composer update
Composer could not find a composer.json file in C:\Windows\System32
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage


パッケージが無いの理由なであるため、update後にもう一度実行すればエラーが解消されない場合、
PHP 設定ファイルから以下のように設定すとなっているかの確認を行ってください。
コメントアウトを外して下記ように設定することで上記エラーの解消となります。

php.ini

extension=zip

コメント