PHPackages                             firehed/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. firehed/container

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

firehed/container
=================

Dependency inversion container with advanced autowiring and compilation support. PSR-11 compliant.

1.1.0(3w ago)2331.8k[14 issues](https://github.com/Firehed/container/issues)[3 PRs](https://github.com/Firehed/container/pulls)MITPHPPHP ^8.2CI passing

Since Mar 14Pushed 3w ago2 watchersCompare

[ Source](https://github.com/Firehed/container)[ Packagist](https://packagist.org/packages/firehed/container)[ RSS](/packages/firehed-container/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (26)Versions (40)Used By (0)

Container
=========

[](#container)

A PSR-11 compliant Dependency Inversion Container

[![Test](https://github.com/Firehed/container/actions/workflows/test.yml/badge.svg)](https://github.com/Firehed/container/actions/workflows/test.yml)[![Static analysis](https://github.com/Firehed/container/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/Firehed/container/actions/workflows/static-analysis.yml)[![Lint](https://github.com/Firehed/container/actions/workflows/lint.yml/badge.svg)](https://github.com/Firehed/container/actions/workflows/lint.yml)[![Packagist](https://camo.githubusercontent.com/aa7730366cf57b28666b980c1e7693752886ce38208bff07dc30f67c97771440/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666972656865642f636f6e7461696e65722e737667)](https://packagist.org/packages/firehed/container)

Quick Start
===========

[](#quick-start)

If you're already familiar with Dependency Inversion, auto-wiring, and PSR-11, start here.

Install the library:

```
composer require psr/container firehed/container

```

Get a container:

```
$container = \Firehed\Container\AutoDetect::instance('config');
```

Tip

AutoDetect mode will cache the autowiring output except in a development environment.

Configure your app/services:

```
