PHPackages                             flightphp/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. flightphp/container

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

flightphp/container
===================

FlightPHP Dependency Injection Container

v1.3.0(1y ago)51.5k↓28.6%3MITPHPPHP &gt;=7.4

Since Mar 10Pushed 1y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (6)Versions (11)Used By (3)

FlightPHP Container
===================

[](#flightphp-container)

[![Latest Stable Version](https://camo.githubusercontent.com/4bf3b716a7da9be88a27f3fa4344b514c21c209169ab6c09d6100d4cfc4e5323/687474703a2f2f706f7365722e707567782e6f72672f666c696768747068702f636f6e7461696e65722f763f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/flightphp/container)[![Total Downloads](https://camo.githubusercontent.com/b17f08b127d8df4b1e2778dd8871293fc56ab1c94bb18ad8be499984ce0dade3/687474703a2f2f706f7365722e707567782e6f72672f666c696768747068702f636f6e7461696e65722f646f776e6c6f6164733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/flightphp/container)[![License](https://camo.githubusercontent.com/06d5faf5b8d0de6f127757a5f8f675090f9b8002933e6d3035df27e7ebc83e50/687474703a2f2f706f7365722e707567782e6f72672f666c696768747068702f636f6e7461696e65722f6c6963656e73653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/flightphp/container)[![PHP Version Require](https://camo.githubusercontent.com/fd2d64414b1781f665b09bd2374625c4e03ac412e1a6aa3f6cce704ed1668910/687474703a2f2f706f7365722e707567782e6f72672f666c696768747068702f636f6e7461696e65722f726571756972652f7068703f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/flightphp/container)[![phpstan](https://camo.githubusercontent.com/5c247073dcc70b55571a3676ea3e3abf5102cad05cf6ad2d7bb873651be4a48f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d6d61782d677265656e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/5c247073dcc70b55571a3676ea3e3abf5102cad05cf6ad2d7bb873651be4a48f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d6d61782d677265656e3f7374796c653d666f722d7468652d6261646765)[![code coverage](https://camo.githubusercontent.com/529db847db60bd32c89f2e71acb45b2ec8f033ceeab66527c3517f676812b20a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f636f7665726167652d3130302532352d677265656e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/529db847db60bd32c89f2e71acb45b2ec8f033ceeab66527c3517f676812b20a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f636f7665726167652d3130302532352d677265656e3f7374796c653d666f722d7468652d6261646765)

A lightweight Dependency Injection Container (DIC) for PHP, to manage and streamline object dependencies effectively.

Features
--------

[](#features)

- **Lightweight and Efficient:** Manage dependencies with ease.
- **Flexible Configuration:** Easily integrate with various PHP applications.
- **PSR-11 Compliance:** Ensures interoperability between containers.

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Composer installed on your system

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

[](#installation)

To include the FlightPHP Container in your project, you can use Composer:

```
composer require flightphp/container
```

Simple usage
------------

[](#simple-usage)

To use the FlightPHP Container, you can create a new instance of the container and bind your dependencies:

```
