Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Semver Laravel Package

composer/semver

A standalone PHP library for parsing, validating, and comparing semantic version numbers and constraints, extracted from Composer. It normalizes versions, handles stability flags and branches, and powers dependency version checks. Requires PHP 5.3.2+.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables reliable version constraint parsing and validation for dependency management systems (e.g., plugin ecosystems, package registries)
  • Critical for roadmap items involving automated compatibility checks (e.g., "Does Package X work with Version Y?")
  • New in 3.5.0: VersionParser::isValid() gives a first-class, one-call API to answer "is this a valid/normalizable version string?" — directly serves user-facing validation (manifest uploads, plugin submission forms, upgrade pre-flight checks) without custom guard code
  • Eliminates need to build custom version logic (build vs buy), reducing technical debt and development time by 3–6 months
  • Supports compliance with semantic versioning standards in release pipelines and upgrade workflows
  • 3.5.0 correctness fixes reduce false positives/negatives in compatibility results: constraint compaction no longer widens > 1.0.0 != 2.0.0 || < 1.9.0 into != 2.0.0 (which wrongly matched all dev-* versions), and >=/< on RC versions no longer picks up a spurious -dev suffix — both improve trust in any "is this upgrade safe?" surface we ship
  • 3.5.0 CompilingMatcher performance improvement lowers per-call overhead in hot paths (bulk constraint matching across a registry), improving responsiveness of large compatibility scans

When to Consider This Package

  • When building PHP applications requiring semantic versioning compliance (e.g., package managers, dependency resolvers, CI/CD tools)
  • When needing to validate version strings, parse constraints like ^1.2.3, or compare versions with stability flags (e.g., 1.0.0-beta)
  • When exposing version input to end users or external systems — isValid() (3.5.0+) lets us reject malformed input with a supported API rather than try/catch around normalization
  • When integrating with Composer-based workflows or PHP ecosystem tools
  • When constraint sets involve dev-* versions, branch aliases, or RC/alpha/beta boundaries — 3.5.0 fixes correctness here, so pin to ^3.5 rather than older 3.x
  • Look elsewhere when:
    • Project uses non-PHP stack (e.g., Node.js, Python) where native semver libraries exist
    • Only basic numeric version checks are needed (though this package still offers value)
    • Requirements demand strict semver compliance beyond Composer's implementation (rare)

How to Pitch It (Stakeholders)

Executives: "This MIT-licensed package is the industry standard for version handling in PHP, used by Composer itself. It eliminates the risk and cost of building custom version logic, ensuring accurate dependency resolution and reducing time-to-market for features like plugin compatibility checks. With 3,287 GitHub stars and active maintenance, it's battle-tested and zero-risk for our product. The 3.5.0 release is a low-risk minor upgrade — no breaking changes — that adds a direct 'is this version valid?' API for user-facing validation and fixes two correctness bugs in constraint handling around dev and RC versions, which means fewer wrong compatibility answers to customers."

Engineering: "Lightweight, battle-tested library with robust CI/CD and tests. 3.5.0 is a drop-in minor bump: no deprecations or breaking changes, so it's a low-effort composer update. It gives us VersionParser::isValid() for input validation without hand-rolled try/catch, fixes Intervals::compactConstraint() incorrectly collapsing constraints into != 2.0.0 (which matched all dev-* versions), and fixes >=/< on RC versions picking up an unwanted -dev suffix. CompilingMatcher also avoids rebuilding concatenated cache keys per call, so bulk matching gets faster for free. Recommend constraining to ^3.5 so we get these fixes; regression-test any code that relied on the old (buggy) compaction output. PHPStan and PHPUnit coverage guarantees code quality."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
thomas-0816/doctrine-dbal-duckdb
moyisoft/laravel-admin
oxygen/mod-pages
oxygen/mod-import-export
oxygen/mod-media
ksoft/laravel-contentbuilderjs
ourgoldpackages/exchange
mikkimike/laravel-exchange1c
wandesnet/mercadopago-laravel
tsfcorp/email
larafony/core
laravel-enso/currencies
tartan/laravel-online-payment
gam/laravel-sat-catalogs
cloudcreativity/laravel-stripe
abdulelahragih/querybuilder
wedevbr/celcoin-laravel
surazdott/nepali-date
devsquad-cockpit/laravel
coding-socks/laravel-upload-handler