Skip to content
Advertisement

Composer giving error after updating to version 2

I updated my composer to version 2. Here is my composer.json file

JavaScript

The name was peri-peri, but it was giving error

JavaScript

I changed the name to periperi, but it still gives same error. How can I fix this?

Advertisement

Answer

Attempting to use the same composer.json with composer 1.10.19 you would get:

Deprecation warning: Your package name periperi is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match “^a-z0-9/a-z0-9$”. Make sure you fix this as Composer 2.0 will error.

Basically, the project name needs to be: ‘vendor/name’. Choose a vendor name for your “organization”, and you can use the same package name. If your project is not a library, do not worry much about the “vendor” name. It can be simply your name and it wont be published anywhere. E.g muhammad-umar/periperi would be fine.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement