PHPのパッケージ管理ツールcomposerはインターネット接続の際にSSLを使用する
そのためPHPの設定なしにcomposerのネット接続を行うコマンドを使用すると以下のようなエラーが出る
[Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.
PHPでSSLの使用が許可されていないことが原因なのでSSLを有効にする必要がある
手順

PHPのインストールフォルダを開いて、「php.ini-development」と「php.ini-production」があることを確認する
「php.ini-development」をリネームして「php.ini」に変更する
リネームした「php.ini」をテキストエディタで開いて以下の行のコメントアウトをはずす
一ヶ所目
; extension_dir = "ext"
から
extension_dir = "ext"
に変更する
二ヶ所目
;extension=openssl
から
extension=openssl
に変更する
補足
「php.ini-development」と「php.ini-production」は開発用とリリース用なので少し内容が違うがsslの設定部分は特に変わらない
コメント
[…] composerのSSLのエラーを解決するPHPのパッケージ管理ツールcomposerはインター… […]