PHPackages                             carmelosantana/php-pathhelper - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. carmelosantana/php-pathhelper

ActiveLibrary[File &amp; Storage](/categories/file-storage)

carmelosantana/php-pathhelper
=============================

Cross platform path normalization and comparison helpers for PHP 8.4+.

v0.1.0(1mo ago)0793MITPHPPHP ^8.4CI passing

Since Apr 28Pushed yesterdayCompare

[ Source](https://github.com/carmelosantana/php-pathhelper)[ Packagist](https://packagist.org/packages/carmelosantana/php-pathhelper)[ RSS](/packages/carmelosantana-php-pathhelper/feed)WikiDiscussions main Synced 1w ago

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

php-pathhelper
==============

[](#php-pathhelper)

Cross-platform path helpers for PHP 8.4+.

This package provides a tiny, dependency-free utility surface for normalizing, comparing, and resolving path-like strings across Unix and Windows.

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

[](#installation)

```
composer require carmelosantana/php-pathhelper
```

API
---

[](#api)

- `PathHelper::trimTrailingSlash(string): string`
- `PathHelper::normalizeForComparison(string): string`
- `PathHelper::isAbsolutePath(string): bool`
- `PathHelper::isWithinBasePath(string, string): bool`
- `PathHelper::fileUrlToPath(string): ?string`

Development
-----------

[](#development)

```
composer install
composer test
composer analyse
```

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/597820?v=4)[Carmelo Santana](/maintainers/carmelosantana)[@carmelosantana](https://github.com/carmelosantana)

---

Top Contributors

[![carmelosantana](https://avatars.githubusercontent.com/u/597820?v=4)](https://github.com/carmelosantana "carmelosantana (2 commits)")

---

Tags

phpfilesystempathpathswindows

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/carmelosantana-php-pathhelper/health.svg)

```
[![Health](https://phpackages.com/badges/carmelosantana-php-pathhelper/health.svg)](https://phpackages.com/packages/carmelosantana-php-pathhelper)
```

###  Alternatives

[internal/path

Type-safe, immutable file path library with cross-platform support and automatic normalization.

1284.5k8](/packages/internal-path)[hdaklue/larapath

A secure, fluent path builder for PHP with sanitization strategies and Laravel 11-12 integration

831.8k](/packages/hdaklue-larapath)

PHPackages © 2026

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