HelloWorld-PHP icon indicating copy to clipboard operation
HelloWorld-PHP copied to clipboard

composer.json file is not compatible with latest composer version (2.0.7)?

Open OttoCaldwell opened this issue 4 years ago • 3 comments

I am getting this error when running composer install with a clone of this repo:

[Composer\Json\JsonValidationException] ./composer.json does not match the expected JSON schema: - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$

It seems composer needs a '/' in the name field. I tried replacing the '-' with a '/', as below and it seems to get past this issue:

{ "name": "intuit/demos-webhooks" ....

but I don't know if that is the correct fix or not...just a test and it seemed to work.

OttoCaldwell avatar Nov 14 '20 06:11 OttoCaldwell

How did you figure this out? Actually you just saved me.

iamshuls avatar Feb 03 '21 07:02 iamshuls

Thanks Otto

edigermatthew avatar Jun 29 '21 20:06 edigermatthew

@OttoCaldwell here is the reason why it worked : ).

Already generated the PR with changes.

aizazshahid avatar Jan 06 '22 14:01 aizazshahid