phpcomposer-phppackagist

How to Remove packagist.org Tag Ignored Warning Message?


I released a package version to packagist.org, through github.com releases, with a version tag that packagist.org didn't like (suffix of -dev). I've corrected the version error and republished and the corrected version is now showing up on packagist.org.

However, there is still a warning message (I'm assuming only seen by me, as the maintainer) that:

Some tags were ignored because of a version mismatch in composer.json.

Not a big deal, but it would be nice to remove that warning message. How can I do that?

Please note, there is not a version attribute in the composer.json file and as already mentioned, the latest release is showing up just fine.


Solution

  • Some tags were ignored because of a version mismatch in composer.json. [in the admin of packagist.org]

    [...] it would be nice to remove that warning message. How can I do that?

    In short, delete the tag from Microsoft Github, as it is the (remote) Git repository Composer uses for your package.

    Longer:

    Given Composer checks for versions (releases) in a package and it is a Git repository, one thing Composer does is to fetch all tags (e.x. git-ls-remote(1)), then checking the composer.json project configuration file at those revisions.

    When the <tag-ref>:composer.json#/version mismatches the <tag-ref> (in your specific case this is more a virtual thing here as it is about validating the <tag-reg> as a composer.json#/version but exactly this contraint applies here), then the tag (as a package version) is dropped and the warning is shown so that you notice this, as it can have consequences that a specific version could not be found.

    As Packagist does this to do the book-keeping for the services of packagist.org (indexing all public packages), you see it in the admin panel there.

    In your case this is less an issue as you don't miss the version (you've solved that already by adding a new version "on top"), it still nudges you and you want to get rid of it.

    The only way to achieve that is to yank the culprit, that is the actual tag (<tag-ref> above) in the repository, specifically the Git repository Composer connects to.

    Now, removing published tags has consequences, and yes, this is a warning, so check your baseline for your actions. The git-tag(1) docs have a section I'd recommend as a reading in this context:

    It's not a perfect match for the case asked about, but worth to understand before changing or even deleting a tag that has been pushed. YMMV.

    The problem with the actual tag-name may come as a surprise as you normally can tag in Git quite freely (only some constraints on the tag-name).

    But if the same Git repository is used as well as a package source for Composer (a package repository in Composer sprak), there are more requirements, specifically I'd recommend the following readings from the official Composer documentation to handle the tagging in the future without the warnings:

    1. Composer Versions vs VCS Versions
    2. VCS Tags and Branches (2.1 - 2.4).

    Additional note: There can be other causes of this warning, just deleting the tag will not remove the warning then. Prevent such causes by using composer-validate before publishing (as you should do anyway) and understand all of the warnings of it, hypertext references should be provided.