0

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": "my@email.com"
        }
    ],
    "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?

mafortis
  • 6,750
  • 23
  • 130
  • 288
  • Please share more details. Are you using the `funding` key in any version of your package? – Nico Haase Aug 05 '22 at 11:46
  • @NicoHaase that's all I have. to answer your question: No. `Note:` while I'm getting this error but I also am able to install my package latest tag version when I use `composer require` – mafortis Aug 05 '22 at 13:11

1 Answers1

0

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.

hakre
  • 193,403
  • 52
  • 435
  • 836