【laravleエラー】Composer\Downloader\TransportException / Installation failed, reverting ./composer.json to its original content


久々にlaravelプロジェクト作ろうとするとエラーになってハマった。


# 環境

mac os
php7系
composer:1.10.7
laravel5かlaravel7

# 結論

composer入れ直した。

```
全消し
~/.composer
消して入れ直す。
/bin/local/composer
```

インストールは公式を参照

https://getcomposer.org/


# 現象

キーを設定し直したり
https://composer.github.io/pubkeys.html

環境設定直したり
色々やっても直らなかった。

30分くらい調べて、一応公式サーバー落ちてないかtwitterでも調べて、
どうにも直らないので入れ直したら動いた。


```:bash
composer create-project --prefer-dist laravel/laravel web "5.5.*"
Creating a "laravel/laravel" project at "./web"
Installing laravel/laravel (v5.5.28)
  - Installing laravel/laravel (v5.5.28): Loading from cache
Created project in /Users/hoge/Projects/sample/entame_db/web
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)

                                                                                                                                                 
  [Composer\Downloader\TransportException]                                                                                                       
  The "https://packagist.jp/p/symfony/polyfill-mbstring%2463622136eb14e873755fe5fa81cb1bdbd6b9eaaa07fdd33f7ab8338066d34bd1.json" file could not  
   be downloaded (HTTP/1.1 404 Not Found)                                                                                                        
                                                                                                                                                 

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

```


```:bash
composer global require laravel/installer
Changed current directory to /Users/hoge/.composer
Using version ^3.1 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installation failed, reverting ./composer.json to its original content.

                                                                                                                                                 
  [Composer\Downloader\TransportException]                                                                                                       
  The "https://packagist.jp/p/symfony/polyfill-intl-idn%2464369d463d5ebb448bfcb1dacd2a849eec4d5b3ccbfd1936454ec1690c27a23b.json" file could not  
   be downloaded (HTTP/1.1 404 Not Found)                                                                                                        
                                                                                                                                                 

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

```