PHPackages                             siteparts/asset - 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. siteparts/asset

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

siteparts/asset
===============

Generate cache busted web assets URLs

v1.0.0(2y ago)0281BSD-3-ClausePHPPHP ^7.1 || ^8.0

Since Jun 3Pushed 2y agoCompare

[ Source](https://github.com/siteparts/asset)[ Packagist](https://packagist.org/packages/siteparts/asset)[ Docs](https://github.com/siteparts/asset)[ RSS](/packages/siteparts-asset/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Asset
=====

[](#asset)

*Generate cache busted web assets URLs.*

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

[](#installation)

Via Composer:

```
$ composer require siteparts/asset
```

Usage
-----

[](#usage)

The following example assumes that your application is located at `example.org/app` and you have all your assets in directory `public` in your project root directory:

```
project-root
|- public
   |- css
      |- style.css
   |- img
      |- image.png
   |- index.php
|- src
|- templates
...

```

Create the AssetHelper and start generating cache busted assets URLs:

```
use SiteParts\Asset\AssetHelper;

$localPath = "public";
$basePath = "/app";

$assetHelper = new AssetHelper(
	$localPath,
	$basePath
);

$styleUrl = $assetHelper("css/style.css");
// $styleUrl contains e.g. "/app/css/style.css?v=1591103864"

$imageUrl = $assetHelper("img/image.png");
// $imageUrl contains e.g. "/app/img/image.png?v=1591057923"
```

For use with a PSR-11 container, you can also use the `ConfigProvider` supplied.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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

Total

3

Last Release

921d ago

Major Versions

v0.1.1 → v1.0.02023-11-08

PHP version history (2 changes)v0.1.0PHP ^7.1

v1.0.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ca9b2beb4cf4006fe50549c3af315f638b9a0754a962705ea5eea7c6f23d37b?d=identicon)[tomascapka](/maintainers/tomascapka)

---

Top Contributors

[![tomascapka](https://avatars.githubusercontent.com/u/63675470?v=4)](https://github.com/tomascapka "tomascapka (3 commits)")

---

Tags

urlhelperasset

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/siteparts-asset/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[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)[beste/json

A simple JSON helper to decode and encode JSON

4222.7M3](/packages/beste-json)

PHPackages © 2026

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