Download the PHP package sunnynath/laravel-release-manager without Composer
On this page you can find all versions of the php package sunnynath/laravel-release-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-release-manager
Laravel Release Manager
Enterprise-ready application release metadata and version governance for Laravel applications.
sunnynath/laravel-release-manager is a standalone Laravel package for exposing, resolving, caching, and automating application release metadata. It is designed for teams that need a reliable way to answer simple but important production questions:
- What version is currently deployed?
- Which build, branch, and commit produced this runtime?
- Where should release metadata come from in CI/CD?
- How can APIs and operational tooling expose release details safely?
- How can Git tags and version files stay in sync?
The package follows Semantic Versioning for application release versions and supports Laravel package auto-discovery.
Requirements
- PHP 8.2 or higher
- Laravel 10, 11, or 12
- Composer
- Git, only when using Git-backed release automation commands
Installation
Install the package with Composer:
Laravel auto-discovers the service provider and facade. Publish the configuration file:
This publishes:
Quick Start
Set a release version in your environment:
Show the current release metadata:
Use the helper functions anywhere in your Laravel app:
Render the application version in Blade:
Use the facade:
Configuration
After publishing the config file, configure release metadata in config/release-manager.php.
Common environment variables:
Cache configuration:
Optional metadata endpoint configuration:
Git automation configuration:
Compatibility governance configuration:
Audit logging configuration:
Version Resolution
Versions are resolved from configured sources in deterministic priority order. The first source that returns a non-empty valid Semantic Version wins.
Available sources:
| Source | Description |
|---|---|
env |
Reads the configured environment key, usually RELEASE_VERSION. |
config |
Reads a Laravel config key, usually release-manager.version. |
file |
Reads a version string from a configured file. |
git |
Reads the latest valid Semantic Version from Git tags. |
If no configured source returns a version, the package uses fallback_version.
Supported version examples:
The leading v is accepted and normalized away.
Release Metadata
release_metadata() and Release::metadata() return a ReleaseMetadata value object with:
| Field | Description |
|---|---|
version |
Resolved Semantic Version. |
build_number |
Build identifier from config/env. |
commit_hash |
Git commit hash from config/env. |
branch |
Branch name from config/env. |
environment |
Laravel application environment. |
channel |
Release channel: stable, beta, or rc. |
changelog_url |
Optional changelog reference URL. |
Example:
Compatibility Governance
API client compatibility checks. Configure a minimum supported client version:
Attach the middleware to API routes:
Compatible clients pass through when their header satisfies the configured minimum:
Incompatible clients receive a structured JSON response:
You can also use the service directly:
Artisan Commands
release:show
Displays the resolved application release metadata.
release:bump
Bumps the resolved version and writes it to the configured version file.
Supported bump parts:
| Part | Example |
|---|---|
patch |
1.2.3 to 1.2.4 |
minor |
1.2.3 to 1.3.0 |
major |
1.2.3 to 2.0.0 |
release:sync
Finds the latest valid Semantic Version from Git tags and writes it to the configured version file.
release:tag
Previews or creates a Git tag for a release version.
By default, release:tag is a preview. Pass --create to actually create the Git tag. The options --create and --dry-run cannot be used together.
release:doctor
Checks release manager configuration and Git automation readiness. This is the fastest way to catch malformed source priority, invalid Semantic Versions, invalid release channels, missing Git state, and command setup issues.
All release automation commands support --json and --ci for CI/CD pipelines. The --ci option implies machine-readable JSON output and deterministic exit codes.
In CI mode, release:doctor fails only for critical problems such as invalid configuration or an unresolvable release version. Non-critical readiness warnings, such as optional Git details not being available, are reported in JSON without failing the process.
Laravel About Command
The package registers release details with Laravel's built-in about command:
The Laravel Release Manager section includes:
- Package name and package version
- Resolved application version
- Release channel
- Build number, commit hash, and branch
- Minimum supported client version
- Cache and metadata endpoint status
Audit Logging
Release-changing commands write compact audit log entries after real changes:
| Command | Audit action |
|---|---|
release:bump |
release.bumped |
release:sync |
release.synced |
release:tag --create |
release.tagged |
Dry runs are not logged. Disable logging with:
HTTP Headers
Attach the middleware to routes that should expose release headers:
The middleware adds:
| Header | Value |
|---|---|
X-App-Version |
Resolved application version. |
X-App-Build |
Configured build number. |
X-Git-Commit |
Configured commit hash. |
You may also reference the middleware class directly:
Optional Metadata Endpoint
The JSON metadata endpoint is disabled by default because release metadata can be operationally sensitive.
Enable it in config/release-manager.php:
Then request:
Example response:
For production APIs, protect this endpoint with your own middleware when needed:
Blade Usage
Render the current application version:
Example footer:
Facade And Helpers
Helpers:
Facade:
CI/CD Examples
Bump a patch version and create a tag:
Sync the application version from Git tags:
Read machine-friendly metadata:
Contributing
Contributions are welcome through pull requests.
The usual workflow is to fork the repository, create a branch in your fork, make the change, and open a pull request back to this repository. Contributors do not need branches inside the main repository.
Then open a pull request from your fork. Please include a short explanation of the change and tests when the change affects behavior.
Testing
From the package root:
Run Composer validation before tagging a release:
License
Laravel Release Manager is open-sourced software licensed under the MIT license.
All versions of laravel-release-manager with dependencies
composer-runtime-api Version ^2.2
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
psr/log Version ^2.0|^3.0
symfony/process Version ^6.2|^7.0