Download the PHP package malek/laravel-api-versioning without Composer
On this page you can find all versions of the php package malek/laravel-api-versioning. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download malek/laravel-api-versioning
More information about malek/laravel-api-versioning
Files in malek/laravel-api-versioning
Package laravel-api-versioning
Short Description Opinionated API versioning, deprecation lifecycle, usage tracking and alerts for Laravel
License MIT
Informations about the package laravel-api-versioning
Laravel API Versioning & Deprecation Manager
A production-ready API Versioning & Deprecation Lifecycle Manager for Laravel.
Table of Contents
- Why This Package?
- Features
- Installation
- Quick Example
- Configuration
- Architecture
- Artisan Commands
- Use Cases
- Production Notes
- Testing
- Roadmap
- Contributing
- License
- Author
Why This Package?
Laravel does not provide structured API lifecycle management out of the box.
As APIs evolve, teams need:
- Version isolation (
/v1,/v2) - Safe deprecation workflows
- Sunset communication
- Client-aware usage tracking
- Deprecated traffic monitoring
This package provides an opinionated and production-focused solution.
Features
API Versioning
- Route prefix versioning
- Header-based version resolution
- Query parameter fallback
- Version mismatch protection
Example:
Access:
API Deprecation Management
Mark routes as deprecated:
Response headers:
Per-Client Usage Tracking
Tracks:
- Version
- Route
- Client (API key or authenticated user)
Supports:
- Header-based client resolution
- Auth-based resolution
- Anonymous fallback
Deprecated Usage Alerts
-
Configurable threshold
-
Time window monitoring
- Critical log trigger
Installation
Requirements
- PHP 8.1+
- Laravel 10 or 11
Install:
Publish config:
Quick Example
Configuration
File:
Default Version
Version Resolver
Client Resolver
Usage Tracking
Deprecation Alerts
Architecture
Artisan Commands
Use Cases
- Mobile API version governance
- SaaS public APIs
- Gradual API migrations
- Enterprise API lifecycle control
- B2B multi-client APIs
Production Notes
-
Uses Laravel Cache (Redis recommended)
-
Logging-based alert mechanism
-
No database dependency
- Horizontal scaling friendly
Testing
Roadmap
- Database persistence driver
- Slack / email alert integration
- Prometheus metrics exporter
- OpenAPI compatibility
- Sunset enforcement mode
Admin dashboard
Contributing
- Fork repository
- Create feature branch
- Submit Pull Request
License
MIT License
Author
Malek Deghlawi
GitHub: https://github.com/malek-deghlawi