PHPackages                             pixelplugin/wp-container - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. pixelplugin/wp-container

ActiveWordpress-plugin[PSR &amp; Standards](/categories/psr-standards)

pixelplugin/wp-container
========================

WordPress Container Plugin

v1.2.0(2y ago)03MITPHPPHP &gt;=7.0

Since Nov 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/pixelpluginhq/wp-container)[ Packagist](https://packagist.org/packages/pixelplugin/wp-container)[ Docs](https://pixelplugin.com)[ RSS](/packages/pixelplugin-wp-container/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

WordPress Container Plugin
==========================

[](#wordpress-container-plugin)

`pixelplugin/wp-container` is a WordPress plugin that provides a global PSR-compatible dependency container accordingly to [WordPress Container API](https://github.com/pixelpluginhq/wp-container-api).

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

[](#installation)

```
composer require pixelplugin/wp-container
```

Usage
-----

[](#usage)

1. Install this plugin
2. Require [pixelplugin/wp-container-api](https://github.com/pixelpluginhq/wp-container-api) via composer in your project
3. Now you can use the Container API

Filters
-------

[](#filters)

### wp\_container

[](#wp_container)

```
/**
 * @param array $definitions container definitions.
 */
apply_filters('wp_container', $definitions);
```

The filter should be used to configure container definitions for your code. It supports the following formats:

- `ClassName::class` to simply add some class to the container, but normally it's not needed, because the container supports auto-wiring.
- `InterfaceName::class => ClassName::class` to specify another implementation of some class/interface.
- `ClassName::class => $instance` to bind a class name with a pre-created instance.
- `ClassName::class => $callable` to bind a class name with some callable factory.

This filter is used on `after_setup_theme` action to create the container, so the container is completely available on `init` hook (or on the same `after_setup_theme` but with lower priority).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Total

3

Last Release

912d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61c0097fcc89b74e8282515f2a4e611fab0ebdd9390b5e92cf6fb3814b13ff50?d=identicon)[pixelplugin](/maintainers/pixelplugin)

---

Top Contributors

[![pixelpluginhq](https://avatars.githubusercontent.com/u/148715416?v=4)](https://github.com/pixelpluginhq "pixelpluginhq (13 commits)")

---

Tags

composercontainerdependency-injectionphppsrpsr-11wordpresswordpress-pluginpsrplugincontainerPSR-11container-interfacewordpressdependency-injectiondi

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/pixelplugin-wp-container/health.svg)

```
[![Health](https://phpackages.com/badges/pixelplugin-wp-container/health.svg)](https://phpackages.com/packages/pixelplugin-wp-container)
```

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)

PHPackages © 2026

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