invalid composer.json metadata packagist

205 Views Asked by At

When I push new tag to my package to update my composer plugin it returns this error:

Update of failed, invalid composer.json metadata [Composer\Repository\InvalidRepositoryException] Some branches contained invalid data and were discarded, it is advised to review the log and fix any issues present in branches

one

Here is my composer.json file:

{
    "name": "package/name",
    "description": "....",
    "keywords": [
        "...",
        "...",
        "..."
    ],
    "homepage": "https://github.com/username/package-name",
    "type": "composer-plugin",
    "require": {
        "php": "^7.4|^8.0",
        "illuminate/support": "^7.0|^8.0|^9.0"
    },
    "require-dev": {
        "composer/composer": "^2.0"
    },
    "license": "MIT",
    "autoload": {
        "psr-4": {
            "Package\\Name\\": "src/"
        }
    },
    "authors": [
        {
            "name": "My name",
            "email": "[email protected]"
        }
    ],
    "minimum-stability": "dev"
}

And when I run composer validate I get ./composer.json is valid.

As you can see there is no domain name mention whatsoever but error is returning my domain name as invalid which says: must be an http/https URL

Any idea?

1

There are 1 best solutions below

0
hakre On

You need to read the error message in full and with peace of mind (unfortunately you were hiding it from the question by encoding it as image/png).

Don't look into one revision, instead search the history for it:

$ git log -p -S 'funding' main composer.json

It should get you started to learn about the revisions that are related to "funding" in composer.json within the main branch.