PHPackages                             geosocio/slugger - 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. geosocio/slugger

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

geosocio/slugger
================

Creates URL Slugs from Strings

1.1.2(8y ago)19011LGPL-3.0-or-laterPHP

Since Jul 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/geosocio/slugger)[ Packagist](https://packagist.org/packages/geosocio/slugger)[ RSS](/packages/geosocio-slugger/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (1)

Slugger [![Build Status](https://camo.githubusercontent.com/a06b2397577fde4c1816c2ff398625760e683f15b899bd44f4005f76f87c63bf/68747470733a2f2f7472617669732d63692e6f72672f67656f736f63696f2f736c75676765722e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/geosocio/slugger) [![Coverage Status](https://camo.githubusercontent.com/f43b4da3b1c1ed242be3d79f028e3661b5c7271bef3d8126ab047c04e48bc476/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f67656f736f63696f2f736c75676765722f62616467652e737667)](https://coveralls.io/github/geosocio/slugger)
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#slugger--)

Create URL Slugs From UTF-8 Strings

Rules
-----

[](#rules)

1. Trim Whitespace
2. Lowercase (if possible)
3. Replace (space) with `-` (dash)
4. Remove `.`, `(`, and `)`
5. Remove any duplicate `-` (dashes)
6. Trim any `-` (dashes) from the beginning or end

Example
-------

[](#example)

```
$slugger = new \GeoSocio\Slugger\Slugger();
echo $slugger->slug('St. Petersburg');
// st-petersburg
```

See more examples in `tests/SluggerTest.php`

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Total

4

Last Release

3025d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6fc8ba46d236d5a86fb070602b551af9b5d138de701e3254082eff4dbe6f201?d=identicon)[davidbarratt](/maintainers/davidbarratt)

---

Top Contributors

[![davidbarratt](https://avatars.githubusercontent.com/u/868364?v=4)](https://github.com/davidbarratt "davidbarratt (8 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/geosocio-slugger/health.svg)

```
[![Health](https://phpackages.com/badges/geosocio-slugger/health.svg)](https://phpackages.com/packages/geosocio-slugger)
```

###  Alternatives

[civicrm/civicrm-core

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

728272.9k17](/packages/civicrm-civicrm-core)[bizley/quill

Quill editor implementation for Yii 2.

64133.3k5](/packages/bizley-quill)[ebanx/benjamin

Business rule provider lib for plugin implementations

18155.2k1](/packages/ebanx-benjamin)[shel/neos-colorpicker

A plugin for Neos CMS which provides a colorpicker editor

1494.4k6](/packages/shel-neos-colorpicker)

PHPackages © 2026

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