1
0

More than 3 years have passed since last update.

composer requireで「xxx.php does not comply with psr-4 autoloading standard」が発生した

Posted at

先日からLaravelで開発していたところ、ある時点を境に

xxx.php does not comply with psr-4 autoloading standard. Skipping.

のエラーが大量に発生した。
image.png

Symfonyは触っていないので、何が問題なのかと調べること1日…… 最初はnamespaceかと思ったけど、問題は自分が起こしたものではなくsymfonyのautoloading側の問題でした。

議論の全貌は以下↓
https://github.com/symfony/symfony/issues/43212

結論

composer2を使用しているのであれば、

composer update

をすれば直ります。

1を使用しているのであれば

composer clear-cache
composer update

これでも直らない場合は、vendor/ディレクトリの内容を削除して再度実行、それでもできない場合はcomposer2へのアップグレードを検討してください。 という旨が上記のリンクに示されています。

原因はどうやら運営がsymfonyの一部を修正した際に、競合が起きた模様… 明日は我が身…気をつけないと。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0