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(3y ago)04.9k[1 PRs](https://github.com/brokeyourbike/resolve-uri-php/pulls)20MPL-2.0PHPPHP ^7.4|^8.0CI failing

Since Oct 19Pushed 3y 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 today

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 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community22

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

1148d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[google/cloud-core

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

346132.9M112](/packages/google-cloud-core)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M160](/packages/algolia-algoliasearch-client-php)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3856.2M31](/packages/gotenberg-gotenberg-php)

PHPackages © 2026

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