PHPackages                             mremi/url-shortener-bundle - 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. [API Development](/categories/api)
4. /
5. mremi/url-shortener-bundle

ActiveSymfony-bundle[API Development](/categories/api)

mremi/url-shortener-bundle
==========================

Implementation of UrlShortener library for Symfony2/Symfony3

v1.1.1(9y ago)19135.0k14[4 issues](https://github.com/mremi/UrlShortenerBundle/issues)[2 PRs](https://github.com/mremi/UrlShortenerBundle/pulls)MITPHPPHP &gt;=5.3.3

Since Jul 20Pushed 7y ago4 watchersCompare

[ Source](https://github.com/mremi/UrlShortenerBundle)[ Packagist](https://packagist.org/packages/mremi/url-shortener-bundle)[ Docs](https://github.com/mremi/UrlShortenerBundle)[ RSS](/packages/mremi-url-shortener-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

MremiUrlShortenerBundle
=======================

[](#mremiurlshortenerbundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/75c807aab304e91a49586accaf1b4e01e4cc2b0bfae51e8d53f549bc50306a52/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63653064363237612d376462652d343961622d613234372d6266323162353362306166652f6269672e706e67)](https://insight.sensiolabs.com/projects/ce0d627a-7dbe-49ab-a247-bf21b53b0afe)

[![Build Status](https://camo.githubusercontent.com/c5e1edbbb2e25901f226152cfd3f58b965f2e283754be31d980f2b6615848e2b/68747470733a2f2f6170692e7472617669732d63692e6f72672f6d72656d692f55726c53686f7274656e657242756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mremi/UrlShortenerBundle)[![Total Downloads](https://camo.githubusercontent.com/d8d69744d4b1dcbdbeb5d103b5f6ee5a6d0a72536909952578dff3602a0e0548/68747470733a2f2f706f7365722e707567782e6f72672f6d72656d692f75726c2d73686f7274656e65722d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/mremi/url-shortener-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/dba3ff9693142441007b82ffb9cd2866512c55a1df12bfa783175cef3e333a2e/68747470733a2f2f706f7365722e707567782e6f72672f6d72656d692f75726c2d73686f7274656e65722d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/mremi/url-shortener-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/513c5677b124b9770243c7a821e3d130c6c4c74e7de047dab598876d2317c588/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72656d692f55726c53686f7274656e657242756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f733d61396532333265376563373564373063303338393530623266316161373262333133613331323731)](https://scrutinizer-ci.com/g/mremi/UrlShortenerBundle/)[![Code Coverage](https://camo.githubusercontent.com/d06c68721d390ce8b2ab0bb06b5b9ac111ed6945d512d7bf52dd5663e3495fd1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72656d692f55726c53686f7274656e657242756e646c652f6261646765732f636f7665726167652e706e673f733d64646662323036303933353836613736346233666339343539613063646532306331303865353437)](https://scrutinizer-ci.com/g/mremi/UrlShortenerBundle/)

This bundle implements the [UrlShortener](https://github.com/mremi/UrlShortener) library for Symfony.

License
-------

[](#license)

This bundle is available under the [MIT license](Resources/meta/LICENSE).

Prerequisites
-------------

[](#prerequisites)

This version of the bundle requires Symfony 2.8, 3.0 or newer.

For compatibility with Symfony 2.7 or earlier, please use 1.0.\* versions of this bundle.

**Basic Docs**

- [Installation](#installation)
- [Chain providers](#chain-providers)
- [Custom provider](#custom-provider)
- [Test configured providers](#test-configured-providers)
- [Retrieve link](#retrieve-link)
- [Twig functions](#twig-functions)
- [Profiler](#profiler)
- [Contribution](#contribution)

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

[](#installation)

Installation is a quick 5 step process:

1. Download MremiUrlShortenerBundle using composer
2. Enable the Bundle
3. Create your Link class (optional)
4. Configure the MremiUrlShortenerBundle
5. Update your database schema (optional)

### Step 1: Download MremiUrlShortenerBundle using composer

[](#step-1-download-mremiurlshortenerbundle-using-composer)

Require `mremi/url-shortener-bundle` via composer:

```
php composer.phar require mremi/url-shortener-bundle
```

Note: if you are using Symfony 2.7 or earlier, please require ~1.0.0 version:

```
php composer.phar require mremi/url-shortener-bundle:~1.0.0
```

Composer will modify your composer.json file and install the bundle to your project's `vendor/mremi` directory.

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Enable the bundle in the kernel:

```
