PHPackages                             brightnucleus/service-locator - 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. brightnucleus/service-locator

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

brightnucleus/service-locator
=============================

Config-driven Service Locator, based on Pimple

v0.3.1(9y ago)11.7kMITPHP

Since Aug 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/brightnucleus/service-locator)[ Packagist](https://packagist.org/packages/brightnucleus/service-locator)[ RSS](/packages/brightnucleus-service-locator/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (8)Versions (8)Used By (0)

Bright Nucleus Service Locator Component
========================================

[](#bright-nucleus-service-locator-component)

> Config-driven Service Locator, based on Pimple.

[![Latest Stable Version](https://camo.githubusercontent.com/4525bb9bf7d9f50feb4b67a99614b894aa9b63e8fec5666d5575982159de8e95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6272696768746e75636c6575732f736572766963652d6c6f6361746f722e737667)](https://packagist.org/packages/brightnucleus/service-locator)[![Total Downloads](https://camo.githubusercontent.com/d32d752315d72c188bc5d05d4f32c7e7801565d52d01aa897215ec0d363f6e64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6272696768746e75636c6575732f736572766963652d6c6f6361746f722e737667)](https://packagist.org/packages/brightnucleus/service-locator)[![Latest Unstable Version](https://camo.githubusercontent.com/cbde5f75b1c5b3cd27798cdd35f3c2e38e06dc3602961ff86a2f7d0ab4fc4ffa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6272696768746e75636c6575732f736572766963652d6c6f6361746f722e737667)](https://packagist.org/packages/brightnucleus/service-locator)[![License](https://camo.githubusercontent.com/c4b169aaebe322bbde2e3733e699fa358d3ac9dc4297188c5b06ef370fc3c6a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6272696768746e75636c6575732f736572766963652d6c6f6361746f722e737667)](https://packagist.org/packages/brightnucleus/service-locator)

This is a config-driven service locator, to allow easy registration and retrieval of services through the [`brightnucleus/config`](https://github.com/brightnucleus/config) component.

It extends the [`pimple/pimple`](https://github.com/silexphp/Pimple) package.

Table Of Contents
-----------------

[](#table-of-contents)

- [About The Bright Nucleus Services Architecture](#about-the-bright-nucleus-services-architecture)
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Contributing](#contributing)
- [License](#license)

About The Bright Nucleus Services Architecture
----------------------------------------------

[](#about-the-bright-nucleus-services-architecture)

This package is part of the Bright Nucleus Services Architecture, which combines a Config management system ([`brightnucleus/config`](https://github.com/brightnucleus/config)), a Dependency Injector ([`brightnucleus/injector`](https://github.com/brightnucleus/injector)), a Service Locator ([`brightnucleus/service-locator`](https://github.com/brightnucleus/service-locator)), a logging subsystem (`brightnucleus/log`), a virtual service provider (`brightnucleus/virtual-services`) and corresponding WordPress plugins (`brightnucleus/wp-services` &amp; `brightnucleus/wp-log`) to form the basis of an architecture that provides the following benefits:

- Configuration of all involved components through Config files that have defaults overrideable through site-specific, environment-specific or custom-injected settings. Write code once, reuse on all sites, in all environments.
- Proper injector that lets you couple your codebase to interfaces only, deciding at runtime which concrete implementations to inject.
- Service locator that manages loading order and dependencies. Only load and instantiate code that is effectively needed within the current context, defined through other running real and virtual services.
- Logging subsystem that provides general logging and error handling, while providing the means to override logging settings at any granularity level.
- Virtual services that let you incorporate third-party and legacy code into the loading order and dependency management flow of the Service Locator.
- An architecture that runs just as well within the WordPress page request cycle as through a CLI or REST API request.
- WordPress-specific helpers that let you monitor the state of your system within the WordPress backend.

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

[](#installation)

The best way to use this component is through Composer:

```
composer require brightnucleus/service-locator
```

Basic Usage
-----------

[](#basic-usage)

> TODO

Contributing
------------

[](#contributing)

All feedback / bug reports / pull requests are welcome.

This package uses the [PHP Composter PHPCS PSR-2](https://github.com/php-composter/php-composter-phpcs-psr2) package to check committed files for compliance with the [PSR-2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). If you have valid reasons to skip this check, add the `--no-verify` option to your commit command:

```
git commit --no-verify
```

License
-------

[](#license)

This code is released under the MIT license.

For the full copyright and license information, please view the [`LICENSE`](LICENSE) file distributed with this source code.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Every ~11 days

Recently: every ~16 days

Total

7

Last Release

3555d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dde7f578e5530884238e7173f768ae3a890b6d66eb99262a82f2c494a1b67d4?d=identicon)[schlessera](/maintainers/schlessera)

---

Top Contributors

[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (7 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brightnucleus-service-locator/health.svg)

```
[![Health](https://phpackages.com/badges/brightnucleus-service-locator/health.svg)](https://phpackages.com/packages/brightnucleus-service-locator)
```

###  Alternatives

[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514135.1M628](/packages/symfony-lock)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[phpro/soap-client

A general purpose SoapClient library

8895.9M52](/packages/phpro-soap-client)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

562565.8k42](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.9M203](/packages/illuminate-broadcasting)

PHPackages © 2026

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