PHPackages                             rudak/slug-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. [Templating &amp; Views](/categories/templating)
4. /
5. rudak/slug-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

rudak/slug-bundle
=================

Simple slug bundle for Symfony2 (and twig...)

1.0(10y ago)01.7k[1 issues](https://github.com/rudak/Slugger/issues)1GPL-3.0+PHPPHP &gt;=5.3.2

Since Sep 1Pushed 10y ago1 watchersCompare

[ Source](https://github.com/rudak/Slugger)[ Packagist](https://packagist.org/packages/rudak/slug-bundle)[ RSS](/packages/rudak-slug-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (1)

Slugger (for Symfony2)
======================

[](#slugger-for-symfony2)

A simple way for generate slugs (everyvhere in your web app)

\#Installation

\###Update your composer.json

add the folowing line in the require area

```
"rudak/slug-bundle": "dev-master"

```

\###Enable the bundle

Enable the bundle in the kernel, in `appKernel.php`

```
new Rudak\Slug\RudakSlugBundle(),

```

============ #How to use it ?

\##In Twig templates

Just add `slugit` after the string you want to transform

\###Exemple :

```
{{ 'my text to slug'|slugit }}

```

\##In a controller

Access the service of the container like this:

```
$Slugger = $this->get('rudak.slugger');

```

Use the service (a static Slug class) like that:

```
echo $Slugger::slugit('slug this string please')
// slug-this-string-please

```

\###Exemple

```
    public function getPostAction()
    {
        $post    = $this->getDoctrine()->getManager()
                        ->getRepository('YourBundle:post')->find(1);

        $Slugger = $this->get('rudak.slugger');
        return $this->render('YourBundle:Default:your-view.html.twig', array(
            'titleSlug' => $Slugger::slugit($post->getTitle()),
            'post'      => $post
        ));
    }

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3910d ago

### Community

Maintainers

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

---

Top Contributors

[![rudak](https://avatars.githubusercontent.com/u/604478?v=4)](https://github.com/rudak "rudak (21 commits)")

---

Tags

slugtwig

### Embed Badge

![Health badge](/badges/rudak-slug-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/rudak-slug-bundle/health.svg)](https://phpackages.com/packages/rudak-slug-bundle)
```

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91292.0M315](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36663.2M221](/packages/twig-intl-extra)[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[twig/string-extra

A Twig extension for Symfony String

21946.0M133](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21814.8M162](/packages/symfony-ux-twig-component)

PHPackages © 2026

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