The "https://repo.packagist.org/packages.json" file could not be downloaded: allow_url_fopen must be enabled in php.ini
From semantic-mediawiki.org
Issue[edit]
Composer issues the following error message:
[Composer\Downloader\TransportException]
"The "https://repo.packagist.org/packages.json" file could not be downloaded: allow_url_fopen must be
enabled in php.ini" (https:// wrapper is disabled in the server configuration by allow_url_fopen=0 failed
to open stream: no suitable wrapper could be found)"
This issue appears if your hoster disabled the "allow_url_fopen" via the settings of the server's PHP configuration.
Solution[edit]
The issue can be mitigated by using the PHP "-d
" command line option1 with your command by running:2
php -d allow_url_fopen=1 composer.phar update --no-dev