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 1w 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 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

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

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k55](/packages/neuron-core-neuron-ai)[civicrm/civicrm-core

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

762297.9k53](/packages/civicrm-civicrm-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)[aedart/athenaeum

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

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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