PHPackages                             brokeyourbike/resolve-uri - 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. brokeyourbike/resolve-uri

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

brokeyourbike/resolve-uri
=========================

Trait for resolving URI

1.0.3(2y ago)04.8k[1 PRs](https://github.com/brokeyourbike/resolve-uri-php/pulls)20MPL-2.0PHPPHP ^7.4|^8.0

Since Oct 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/brokeyourbike/resolve-uri-php)[ Packagist](https://packagist.org/packages/brokeyourbike/resolve-uri)[ RSS](/packages/brokeyourbike-resolve-uri/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (6)Used By (20)

resolve-uri
===========

[](#resolve-uri)

[![Latest Stable Version](https://camo.githubusercontent.com/7bb3b7651878d968705d21fc2f61d1b19f9b249403d691f190876ffc53cacfee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f62726f6b65796f757262696b652f7265736f6c76652d7572692d706870)](https://github.com/brokeyourbike/resolve-uri-php/releases)[![Total Downloads](https://camo.githubusercontent.com/41f223a31c6ccac564e36ce5555f91b78c432577d0be5166fb007a4596475cd8/68747470733a2f2f706f7365722e707567782e6f72672f62726f6b65796f757262696b652f7265736f6c76652d7572692f646f776e6c6f616473)](https://packagist.org/packages/brokeyourbike/resolve-uri)[![Maintainability](https://camo.githubusercontent.com/fb2df5e9e232175d78b454e64c48a8efe02d7e7a87f5449d263d06049b9935ee/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33646636653534663763663035383330646564392f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/brokeyourbike/resolve-uri-php/maintainability)[![Test Coverage](https://camo.githubusercontent.com/aa157c42afdcfdb0a507c9da1852180af448dce1c3b731f4b6f05261148a06fa/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33646636653534663763663035383330646564392f746573745f636f766572616765)](https://codeclimate.com/github/brokeyourbike/resolve-uri-php/test_coverage)

Trait for resolving URI

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

[](#installation)

```
composer require brokeyourbike/resolve-uri
```

Usage
-----

[](#usage)

```
use BrokeYourBike\ResolveUri\ResolveUriTrait;

class APIClient
{
    use ResolveUriTrait;

    public function fetchProduct(string $productId)
    {
        $uri = $this->resolveUriFor('https://example.com', "products/{$productId}");
    }
}
```

Why
---

[](#why)

Resolve URI when `base_url` is not defined in HTTP client.

Authors
-------

[](#authors)

- [Ivan Stasiuk](https://github.com/brokeyourbike) | [Twitter](https://twitter.com/brokeyourbike) | [LinkedIn](https://www.linkedin.com/in/brokeyourbike) | [stasi.uk](https://stasi.uk)

License
-------

[](#license)

[Mozilla Public License v2.0](https://github.com/brokeyourbike/resolve-uri-php/blob/main/LICENSE)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.6% 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 ~191 days

Total

4

Last Release

1094d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/114f3c6e8506e0bba763451e8e4bcc3e94d662c2dce982a910b5d7b3444593cf?d=identicon)[brokeyourbike](/maintainers/brokeyourbike)

---

Top Contributors

[![brokeyourbike](https://avatars.githubusercontent.com/u/1554371?v=4)](https://github.com/brokeyourbike "brokeyourbike (19 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

hacktoberfestphpphp8rest-apiuri

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brokeyourbike-resolve-uri/health.svg)

```
[![Health](https://phpackages.com/badges/brokeyourbike-resolve-uri/health.svg)](https://phpackages.com/packages/brokeyourbike-resolve-uri)
```

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)[google/cloud-functions-framework

Google Cloud Functions Framework for PHP

21313.4M](/packages/google-cloud-functions-framework)[wallabag/wallabag

open source self hostable read-it-later web application

12.6k2.2k](/packages/wallabag-wallabag)[anthropic-ai/sdk

Anthropic PHP SDK

129134.7k5](/packages/anthropic-ai-sdk)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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