PHPackages                             morningtrain/laravel-deployment - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. morningtrain/laravel-deployment

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

morningtrain/laravel-deployment
===============================

Easily extract version information from a deployment.json file

v1.2.0(3y ago)21042MITPHPPHP ^8.0

Since Jun 2Pushed 3y ago3 watchersCompare

[ Source](https://github.com/Morning-Train/laravel-deployment)[ Packagist](https://packagist.org/packages/morningtrain/laravel-deployment)[ Docs](https://github.com/Morning-Train/laravel-deployment)[ RSS](/packages/morningtrain-laravel-deployment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (4)Used By (0)

Deployment
==========

[](#deployment)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2f570c8660413d937f6fbb6ae33c08acb69d71acedbbd5dd259a9d4d13925a4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f726e696e67747261696e2f6c61726176656c2d6465706c6f796d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/morningtrain/laravel-deployment)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a41e40b2149b0816db70ac91f41527777b82d9d146427b5ab92e4a466751fa61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f4d6f726e696e672d547261696e2f6c61726176656c2d6465706c6f796d656e742f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/Morning-Train/laravel-deployment/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/8a2946a51328da27ff0ac52116e8dd1d655c41a49b340f0ec468c9c264e671f6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f4d6f726e696e672d547261696e2f6c61726176656c2d6465706c6f796d656e742f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/Morning-Train/laravel-deployment/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/53b04b59ec80f64628fb89f114a5c4a8876fc803c448a391c427b8563c3094fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f726e696e67747261696e2f6c61726176656c2d6465706c6f796d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/morningtrain/laravel-deployment)

A package to parse a file for version/deployment information.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require morningtrain/laravel-deployment
```

You can publish the config file with:

```
php artisan vendor:publish --tag="deployment-config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Deployment JSON File
    |--------------------------------------------------------------------------
    |
    | This value is the path to your JSON file. This value is used by the deployment
    | parser to know which JSON file to parse and look for deployment information,
    | to use in your application or provide services like Bugsnag or CI/CD.
    |
    */

    'file' => env('DEPLOYMENT_JSON_FILE_PATH'),
];
```

Deployment.json file
--------------------

[](#deploymentjson-file)

The `deployment.json` we use, looks like this

```
{
    "revision": "123456789",
    "version": "v1.4.0",
    "repository": "http://url-to.repository",
    "username": "User Name"
}
```

The package expects the file to match the format, to be able to parse it.

Usage
-----

[](#usage)

Get the version number

```
use Morningtrain\Deployment\Facades\Deployment;

Deployment::version();
```

Get the username of the committer

```
Deployment::username();
```

Get the revision of the commit

```
Deployment::revision();
```

Get the repository URL

```
Deployment::repository();
```

Get all the data in a Version object

```
Deployment::get();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [Peter Brinck](https://github.com/peterbrinck)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e23c2aff084a4e9d4b8a4e6f6b1a7f86e45cc45079e320b5461a7c74e2cafb6?d=identicon)[peterbrinck](/maintainers/peterbrinck)

---

Top Contributors

[![peterbrinck](https://avatars.githubusercontent.com/u/6154068?v=4)](https://github.com/peterbrinck "peterbrinck (11 commits)")

---

Tags

laravellaravel-packagelaraveldeploymentmorningtrain

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/morningtrain-laravel-deployment/health.svg)

```
[![Health](https://phpackages.com/badges/morningtrain-laravel-deployment/health.svg)](https://phpackages.com/packages/morningtrain-laravel-deployment)
```

###  Alternatives

[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[spatie/laravel-horizon-watcher

Automatically restart Horizon when local PHP files change

2631.9M](/packages/spatie-laravel-horizon-watcher)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[innocenzi/deployer-recipe-forge

Seamless zero-downtime deployment on Forge with Deployer

1916.6k](/packages/innocenzi-deployer-recipe-forge)

PHPackages © 2026

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