Download the PHP package tenantcloud/laravel-api-versioning without Composer
On this page you can find all versions of the php package tenantcloud/laravel-api-versioning. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tenantcloud/laravel-api-versioning
More information about tenantcloud/laravel-api-versioning
Files in tenantcloud/laravel-api-versioning
Package laravel-api-versioning
Short Description Simple Laravel API versioning implementation
License MIT
Informations about the package laravel-api-versioning
Laravel api versioning
Laravel package for api versioning.
Do composer require tenantcloud/laravel-api-versioning
to install the package.
Commands
Install dependencies:
docker run -it --rm -v $PWD:/app -w /app composer install
Run tests:
docker run -it --rm -v $PWD:/app -w /app php:8.1-cli vendor/bin/pest
Run php-cs-fixer on self:
docker run -it --rm -v $PWD:/app -w /app composer cs-fix
Usage:
If no versions needed or endpoint is the same for any version use default Laravel route definition
If route has versions - create some version rule
If we made break change and want to provide new action for new version we should register two rules - one for old versions and new for new and future versions
In some case we can get multiple break changes for some endpoint
All resolves registered by APIVersioningServiceProvider::class
Interface | Default implementation | Description |
---|---|---|
ControllerDispatcher | VersionControllerDispatcher | Router dispatcher |
RequestVersionParser | RequestHeaderVersionParser | Parse version from Illuminate\Http\Request object |
ConstraintChecker | SemanticConstraintChecker | Constrain checker from TenantCloud\APIVersioning\Version\Version interface and array of rules |
VersionParser | SemanticVersionParser | Version parser |
StringConstraintParser | BuiltInStringConstraintParser | Parser from sting |
All versions of laravel-api-versioning with dependencies
illuminate/support Version ^10.0
illuminate/routing Version ^10.0
illuminate/contracts Version ^10.0