Skip to content

Case sensitivity for versions in compose.lock since version 2.8.8 #12374

@Tostifrosti

Description

@Tostifrosti

Today I upgraded from composer 2.8.6 -> 2.8.8.

I ran a composer diagnose on my project and noticed an error which I have not seen before:

Checking composer.lock: FAIL
packages[137].version : Does not match the regex pattern ^v?\d+(?:[.-]\d+){0,3}[._-]?(?:(?:stable|beta|b|RC|rc|alpha|a|patch|pl|p)(?:(?:[.-]?\d+)*+)?)?(?:[.-]?dev|\.x-dev)?(?:\+.*)?$|^dev-.*$

This did not happen on composer 2.8.6.

After further investigation, I came across this package 137 which had the version defined as 0.0.9-BETA.
Manually changing this to 0.0.9-beta seems to fix the issue.

Question
Should this '-beta' tag be case sensitive?
There doesn't seem to be any mention of this in the documentation: https://getcomposer.org/doc/04-schema.md#version

Running composer diagnose on version 2.8.6:
Image

Running composer diagnose on version 2.8.8:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions