PHPackages                             julioserpone/sla-manager - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. julioserpone/sla-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

julioserpone/sla-manager
========================

A PHP package for calculating &amp; tracking the Service Level Agreement completion timings

v1.0.2(3y ago)1104[1 issues](https://github.com/julioserpone/sla-manager/issues)[4 PRs](https://github.com/julioserpone/sla-manager/pulls)MITPHPPHP ^8.0CI failing

Since Oct 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/julioserpone/sla-manager)[ Packagist](https://packagist.org/packages/julioserpone/sla-manager)[ Docs](https://github.com/julioserpone/sla-manager)[ GitHub Sponsors](https://github.com/julioserpone)[ RSS](/packages/julioserpone-sla-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (10)Used By (0)

[![Logo for SLA Timer](https://github.com/julioserpone/sla-manager/raw/HEAD/.github/assets/logo.svg?)](https://github.com/julioserpone/sla-manager/raw/HEAD/.github/assets/logo.svg?)

[![Latest Version on Packagist](https://camo.githubusercontent.com/94b056f5a34c833637effa634ae806e34036c7b6bab5847221d1bf301f3250ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a756c696f736572706f6e652f736c612d6d616e616765722e7376673f7374796c653d666c6174266c6162656c436f6c6f723d326333353363)](https://packagist.org/packages/julioserpone/sla-manager)[![Total Downloads](https://camo.githubusercontent.com/242934c955b894f0e74ec9e6f073c950e2e383f9ac31bf09969c6f7d52b9d40c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756c696f736572706f6e652f736c612d6d616e616765722e7376673f7374796c653d666c6174266c6162656c436f6c6f723d326333353363)](https://packagist.org/packages/julioserpone/sla-manager)[![GitHub Actions](https://github.com/julioserpone/sla-manager/actions/workflows/main.yml/badge.svg)](https://github.com/julioserpone/sla-manager/actions/workflows/main.yml/badge.svg)

A PHP package to calculate and track Service Level Agreement completion times.

Inspired from the [sla-timer](https://github.com/sifex/sla-timer) pack.

### Features

[](#features)

- 🕚 Easy schedule building
- ‼️ Defined breaches
- 🏝 Holiday &amp; Paused Durations

---

[![Hi, I'm Julio & I'm currently looking for a Laravel job. Please reach out to me via twitter, or click this link.](https://github.com/julioserpone/sla-manager/raw/HEAD/.github/assets/hiring.svg?)](https://twitter.com/julioserpone/status/1578441324558135298)---

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

[](#installation)

You can install the `sla-manager` via composer:

```
composer require julioserpone/sla-manager
```

Getting Started
---------------

[](#getting-started)

The best place to get started with SLA timer is to head over to the [✨ SLA Timer Getting Started Documentation](https://julioserpone.github.io/sla-manager/guide/getting_started).

Example Usage
-------------

[](#example-usage)

To create a new SLA Timer, we can start by defining our SLA Schedule:

```
require 'vendor/autoload.php';

use JulioSerpone\SlaManager\SLA;
use JulioSerpone\SlaManager\SLABreach;
use JulioSerpone\SlaManager\SLASchedule;

/**
 * Create a new SLA between 9am and 5:30pm weekdays
 */
$sla = SLA::fromSchedule(
    SLASchedule::create()->from('09:00:00')->to('17:30:00')
        ->onWeekdays()
);
```

We can define out breaches by calling the `addBreaches` method on our SLA

```
/**
 * Define two breaches, one at 24 hours, and the next at 100 hours
 */
$sla->addBreaches([
    new SLABreach('First Response', '24h'),
    new SLABreach('Resolution', '100h'),
]);
```

Now that our **SLA Schedule** and **SLA Breaches** are defined, all we have to do is give our *subject* "creation time" – or our SLA start time – to either the `status` method, or the `duration` method.

```
// Given the time now is 14:00:00 29-07-2022
$status = $sla->status('05:35:40 25-07-2022'); // SLAStatus
$status->breaches; // [SLABreach] [0: { First Response } ]

$duration = $sla->duration('05:35:40 25-07-2022'); // CarbonInterval
$duration->forHumans(); // 1 day 15 hours
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Alex (owner)](https://github.com/sifex)
- [Julio Serpone](https://github.com/julioserpone)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance40

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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 ~6 days

Total

3

Last Release

1300d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74c77162248cbd1ab3f787f9e2dd452ac0bc1293fa874ac14c7aa83177bcdac9?d=identicon)[julioserpone](/maintainers/julioserpone)

---

Top Contributors

[![julioserpone](https://avatars.githubusercontent.com/u/11271496?v=4)](https://github.com/julioserpone "julioserpone (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

scheduleslajulioserponesla-manager

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/julioserpone-sla-manager/health.svg)

```
[![Health](https://phpackages.com/badges/julioserpone-sla-manager/health.svg)](https://phpackages.com/packages/julioserpone-sla-manager)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

583107.1M34.5k](/packages/illuminate-support)[illuminate/config

The Illuminate Config package.

10842.7M2.2k](/packages/illuminate-config)[illuminate/session

The Illuminate Session package.

9937.4M753](/packages/illuminate-session)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[illuminate/reflection

The Illuminate Reflection package.

361.6M3](/packages/illuminate-reflection)

PHPackages © 2026

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