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)128MITPHPPHP &gt;=7.4

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 1mo ago

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 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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

1592d 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

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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