PHPackages                             puli/url-generator - 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. puli/url-generator

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

puli/url-generator
==================

Generates URLs for public Puli resources.

1.0.0-beta4(10y ago)968.6k13[1 PRs](https://github.com/puli/url-generator/pulls)17MITPHPPHP ^5.3.9|^7.0

Since May 29Pushed 7y ago4 watchersCompare

[ Source](https://github.com/puli/url-generator)[ Packagist](https://packagist.org/packages/puli/url-generator)[ Docs](http://puli.io)[ RSS](/packages/puli-url-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (17)

The Puli URL Generator Component
================================

[](#the-puli-url-generator-component)

[![Build Status](https://camo.githubusercontent.com/d918ae61062bb2750db40b134004f7a960261d8339be42efc3010916319102a6/68747470733a2f2f7472617669732d63692e6f72672f70756c692f75726c2d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/puli/url-generator)[![Build status](https://camo.githubusercontent.com/16d3d160df1fcdecdc55870e3565588b446c2a4dfeddf3e9469f00c6c7cd9547/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f78377170656f39657237386674786b302f6272616e63682f6d61737465723f7376673d74727565)](https://ci.appveyor.com/project/webmozart/url-generator/branch/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/059d22176aea174d2f6428339d9fb6714ce3d12364a9220463616b34bfa10b7c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70756c692f75726c2d67656e657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/puli/url-generator/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/e0b084cae3f5de9d318778ceb847755f8fcb220cf171718f8702feaed26eb0e4/68747470733a2f2f706f7365722e707567782e6f72672f70756c692f75726c2d67656e657261746f722f762f737461626c652e737667)](https://packagist.org/packages/puli/url-generator)[![Total Downloads](https://camo.githubusercontent.com/05186fa7b8817de9f831f81df0b86ebbc2eaccf1162a23cf42458f5beb19a937/68747470733a2f2f706f7365722e707567782e6f72672f70756c692f75726c2d67656e657261746f722f646f776e6c6f6164732e737667)](https://packagist.org/packages/puli/url-generator)[![Dependency Status](https://camo.githubusercontent.com/91b522e0a121a99283efab2d45fc23bdae464817e8be5e7d5e648cf2ed02c0e4/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f70756c693a75726c2d67656e657261746f722f312e302e302f62616467652e737667)](https://www.versioneye.com/php/puli:url-generator/1.0.0)

Latest release: [1.0.0-beta4](https://packagist.org/packages/puli/url-generator#1.0.0-beta4)

PHP &gt;= 5.3.9

The [Puli](http://puli.io) URL Generator Component provides an API for generating URLs for Puli resources:

```
echo $generator->generateUrl('/acme/blog/public/css/style.css');
```

The [UrlGenerator](http://api.puli.io/latest/class-Puli.UrlGenerator.Api.UrlGenerator.html) can be created through the factory generated by the [Puli CLI](https://github.com/puli/cli):

```
$factoryClass = PULI_FACTORY_CLASS;
$factory = new $factoryClass();

$repo = $factory->createRepository();
$discovery = $factory->createDiscovery($repo);

$generator = $factory->createUrlGenerator($discovery);
```

Documentation
-------------

[](#documentation)

Read the [Puli Documentation](http://docs.puli.io/en/latest/index.html) to learn more about Puli.

Authors
-------

[](#authors)

- [Bernhard Schussek](http://webmozarts.com) a.k.a. [@webmozart](https://twitter.com/webmozart)
- [The Community Contributors](https://github.com/puli/url-generator/graphs/contributors)

Contribute
----------

[](#contribute)

Contributions to are very welcome!

- Report any bugs or issues you find on the [issue tracker](https://github.com/puli/issues/issues).
- You can grab the source code at Puli’s [Git repository](https://github.com/puli/url-generator).

Support
-------

[](#support)

If you are having problems, send a mail to  or shout out to [@webmozart](https://twitter.com/webmozart) on Twitter.

License
-------

[](#license)

All contents of this package are licensed under the [MIT license](LICENSE).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community30

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.2% 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 ~76 days

Total

4

Last Release

3777d ago

PHP version history (2 changes)1.0.0-beta1PHP &gt;=5.3.9

1.0.0-beta4PHP ^5.3.9|^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/00803e109877ea9de0995e81c928871a595781bd6ea227092bfd7c6df5af58f0?d=identicon)[webmozart](/maintainers/webmozart)

---

Top Contributors

[![webmozart](https://avatars.githubusercontent.com/u/176399?v=4)](https://github.com/webmozart "webmozart (52 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (7 commits)")[![SenseException](https://avatars.githubusercontent.com/u/859964?v=4)](https://github.com/SenseException "SenseException (5 commits)")[![tgalopin](https://avatars.githubusercontent.com/u/1651494?v=4)](https://github.com/tgalopin "tgalopin (4 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (3 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![harikt](https://avatars.githubusercontent.com/u/120454?v=4)](https://github.com/harikt "harikt (1 commits)")

---

Tags

urlresourceassetpulipublic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/puli-url-generator/health.svg)

```
[![Health](https://phpackages.com/badges/puli-url-generator/health.svg)](https://phpackages.com/packages/puli-url-generator)
```

###  Alternatives

[spatie/url

Parse, build and manipulate URL's

73914.3M97](/packages/spatie-url)[league/uri-components

URI components manipulation library

31932.3M67](/packages/league-uri-components)[sabre/uri

Functions for making sense out of URIs.

29335.2M40](/packages/sabre-uri)[spomky-labs/base64url

Base 64 URL Safe Encoding/Decoding PHP Library

15439.5M49](/packages/spomky-labs-base64url)[puli/manager

Manages the puli.json file of a Puli project.

6847.9k3](/packages/puli-manager)[opis/uri

Build, parse and validate URIs and URI-templates

1920.8M6](/packages/opis-uri)

PHPackages © 2026

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