Composer update gives Undefined index: name
If you get an exception like running
composer update in an older Laravel-project.
In PackageManifest.php line 122: Undefined index: name
The problem stems from that older versions of Laravel is not compatible with Composer 2.
|Laravel||Composer 2 support|
|<= 5.4||Not supported|
One solution is to downgrade to Composer 1, and upgrade Laravel and then upgrade to Composer 2 again
composer self-update --1 // change composer.json to make sure the a compatible version of Laravel is used "laravel/framework": ">=5.7.29" composer update // revert back to Composer 2 again. composer self-update --2