laravel でcomposer update したら、
PHP Fatal error: Declaration of Illuminate\Container\Container::get($id) must be compatible with Psr\Container\ContainerInterface::get(string $id)
とエラーが発生したのでその解決方法をメモ
解決策
composer.json の設定をミスったのかとか
composer のchache-clear とか
composer.lockとvendorを削除して、再度、composer install とか
bootstrap/chacheのファイルを削除とか
いろいろ試したが全く解決せず
数時間、格闘した末、
あらためてエラー内容をみると、
Psr\Container\ContainerInterface::get(string $id)
と互換性がないといっている、
つまり、
Illuminate\Container\Container::get($id)
Illuminate\Container\Containerクラスのgetメソッドに、タイプヒンティングがないのでエラーになっていました
取り急ぎの対応として
Illuminate\Container\Container:592あたり
public function get(string $id)
string を追加するとエラー解消
この対応方法でいいのかはわからないが、
緊急で対応する必要がある方は、参考にしてください。。