PHPackages                             palokankare/laravel-api-versions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. palokankare/laravel-api-versions

ActiveLibrary[API Development](/categories/api)

palokankare/laravel-api-versions
================================

Implement date based versioning to Laravel Form Request and Resources for your API

10PHP

Since Jun 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/palokankare/laravel-api-versions)[ Packagist](https://packagist.org/packages/palokankare/laravel-api-versions)[ RSS](/packages/palokankare-laravel-api-versions/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple date based versioning to Laravel API Form Requests and Rerouces
======================================================================

[](#simple-date-based-versioning-to-laravel-api-form-requests-and-rerouces)

**THIS PACKAGE IS STILL IN DEVELOPMENT**

This Laravel package is a proof of concept and inspired of Stripe's [blog post about API versioning](https://stripe.com/blog/api-versioning)

Rather than having large major API versions (v1, v2, v3...) the updates are small and named with the date they are released. This package tries to solve issue when it comes breaking change in Laravel From Requests (for example validation rules) and Laravel Resources.

API resources are written so that the structure they describe is what we’d expect back from the current version of the API. When we need to make a backwards-incompatible change we release new date based API version that will describe how to revert the change.

Example of how versions and changes are described.

```
return [
                '2018-06-05' => [], // Latest version doesn't have any changes naturally. Doesn't have to be defined here.
                '2018-05-28' => [
                    'App\Http\Resources\BookResource' => 'App\Http\Resources\Changes\UpdatePublishedDate',
                    'App\Http\Requests\StoreBook'     => 'App\Http\Requests\Changes\\MakeAuthorNonMandatory',
                ],
                '2018-05-26' => [
                    'App\Http\Resources\BookResource' => 'App\Http\Resources\Changes\AddAuthor',
                    'App\Http\Resources\FooResource'  => 'App\Http\Resources\Changes\Bar',
                ],
        ];

```

### Installation

[](#installation)

Publish the config-file with:

```
php artisan vendor:publish --provider="Klopal\ApiVersions\ApiVersionsServiceProvider" --tag="config"
```

### Usage

[](#usage)

...

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kalle Palokankare](https://github.com/palokankare)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/277939?v=4)[Kalle Palokankare](/maintainers/palokankare)[@palokankare](https://github.com/palokankare)

---

Top Contributors

[![palokankare](https://avatars.githubusercontent.com/u/277939?v=4)](https://github.com/palokankare "palokankare (1 commits)")

### Embed Badge

![Health badge](/badges/palokankare-laravel-api-versions/health.svg)

```
[![Health](https://phpackages.com/badges/palokankare-laravel-api-versions/health.svg)](https://phpackages.com/packages/palokankare-laravel-api-versions)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
