sebastianbergmann/version

Library that helps with managing the version number of Git-hosted PHP projects

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 4 minutes ago
Added to GitGenius on September 10th, 2026
Created on January 5th, 2013
Open Issues & Pull Requests: 1 (+0)
GitHub issues: Enabled
Number of forks: 36
Total Stargazers: 6,568 (+0)
Total Subscribers: 10 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 0.9 hours
Mean response time: 3.5 hours
90th percentile: 6.1 hours
Tracked items: 2

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 116 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • type/dependencies (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

sebastian/version is a PHP library that helps manage version numbers for Git-hosted projects.

The library solves the problem of maintaining accurate version strings across development and release cycles. It works by accepting a release version or series name and a project path, then using Git metadata to determine the appropriate version string to return. When called, the asString() method checks whether the code resides in a Git repository and whether the release parameter follows release format (X.Y.Z) or series format (X.Y), then returns the corresponding version string—either the release as-is, the release with a -dev suffix, or Git describe output combined with the series name.

Developers should choose this library if they need to automatically derive version strings from Git state rather than hardcoding them. It suits PHP projects that use semantic versioning and want development builds to reflect their distance from tagged releases. The library is particularly useful when version information needs to be embedded in code or build artifacts and should differ between release and development branches without manual updates to source files.

The project maintains a focused scope with a single public class and method, keeping the API surface minimal and stable. Development activity shows consistent maintenance with attention to code quality and compatibility across PHP environments.