Skip to content

A word starting with a stability letter is read as a pre-release (-arm64 is alpha) #153

Closed

Description

@roxblnfk

Description

Version reads a stability keyword from the start of a word in the suffix even when more letters follow it, so an ordinary word is taken for a pre-release. The a of arm64 or abc reads as alpha, the b of bugfix or build as beta, ga as alpha.

Such a version gets a stability it does not have: it is filtered out by the default stable constraint, matches @alpha/@beta constraints it should not, and sorts by the wrong stability.

Expected: letters that run together form one word and are read to its end. A word is a stability keyword only when the whole word is one (alpha, a, beta, b, rc, dev…), optionally followed by digits (a1, beta2, rc.1). arm64, abc, bugfix, build, ga are not.

Steps to reproduce

use Internal\DLoad\Module\Version\Version;

Version::fromVersionString('1.0.0-arm64')->stability;  // Alpha, suffix `rm64`
Version::fromVersionString('1.2.3.4abc')->stability;   // Alpha, suffix `bc`
Version::fromVersionString('1.0.0-bugfix')->stability; // Beta
Version Stability now Expected
1.0.0-arm64, 1.0.0-amd64 Alpha Preview (feature suffix)
1.0.0-abc, 1.2.3.4abc Alpha Preview
1.0.0-bugfix, 1.0.0-build.5 Beta Preview
1.0.0-ga Alpha Preview
1.0.0-a1, 1.0.0-beta2, 2.0.0rc1 Alpha / Beta / RC unchanged

Additional context

Activity

  1. added 2 commits that reference this issue on Oct 11, 2026
    ca5f07b
    8905861
  2. added a commit that references this issue on Oct 12, 2026
    fbdca9d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions