PHPackages                             bybrand/shortener-url - 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. bybrand/shortener-url

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

bybrand/shortener-url
=====================

URL Shortener to many providers used internally in Bybrand.

v0.0.8(4y ago)228MITPHPPHP &gt;=7.4CI failing

Since Nov 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bybrand/shortener-url)[ Packagist](https://packagist.org/packages/bybrand/shortener-url)[ RSS](/packages/bybrand-shortener-url/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (9)Used By (0)

Shortener URL
=============

[](#shortener-url)

A dominant URL shortener enabled to many providers. The idea with this extension is your changing between providers without changing lines of the code in the application.

This code is used in production to make short links on [email signatures](https://www.bybrand.io) from the Bybrand.

- Providers supported:: Bitly, and Rebrandly.

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

[](#installation)

```
composer require bybrand/shortenerURL

```

Usage
-----

[](#usage)

First, you need to get the API settings from to your provider. Usually, the `domain`, `token`, and `workspace`, and the next is set in class.

Take a example:

```
use Bybrand\ShortenerURL\Provider;
use Bybrand\ShortenerURL\Shorten;
use Bybrand\ShortenerURL\Exception\ShortenFailed;

$provider = new Provider\Bitly([
    'group'  => '',
    'domain' => '',
    'token'  => '',
]);

$shorten = new Shorten($provider);
$shorten->destination('long url');

// If failed return Exception;
$shorten->create();

// Get all returned params.
$result = $shorten->toArray();

```

### Extra methods

[](#extra-methods)

Too, you can use auxiliary methods how:

```
// Return a short url.
$shorten->getLink();

// Return the ID from the register in the provider.
$shorten->getId();

```

Testing
-------

[](#testing)

```
bash
$ ./vendor/bin/phpunit

```

or individual method test, by group.

```
bash
$ ./vendor/bin/phpunit --group=Bitly

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/bybrand/shortenerURL/blob/master/LICENSE) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~110 days

Recently: every ~191 days

Total

8

Last Release

1639d ago

PHP version history (2 changes)v0.0.1PHP &gt;=7.2

v0.0.8PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

bitlyrebrandly

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bybrand-shortener-url/health.svg)

```
[![Health](https://phpackages.com/badges/bybrand-shortener-url/health.svg)](https://phpackages.com/packages/bybrand-shortener-url)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k42](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k121](/packages/oat-sa-tao-core)

PHPackages © 2026

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