Laravel/framework[v10.0.0, ..., v10.5.1] require composer-runtime-api ^2.2 -> found composer-runtime-api[2.0.0] but it does not match the constraint

Sorun:
Laravel 10.x kurulumunda composer create-project laravel/laravel testprojesi komutu sonrasında aşağıdaki hata ya da hatalardan birkaçı alınıyor.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v10.0.0, ..., v10.5.1] require composer-runtime-api ^2.2 -> found composer-runtime-api[2.0.0] but it does not match the constraint.
    - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., v10.5.1].

Çözüm:

Aşağıdaki iki komut ile önbellek temizliği yapıp tekrar güncelleme sağlayabilirsiniz:

composer clearcache
composer selfupdate