Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mqwerty/dependency-injection
Simple PSR-11 DI container with autowiring
https://github.com/mqwerty/dependency-injection
dependency-injection php psr-11
Last synced: about 22 hours ago
JSON representation
Simple PSR-11 DI container with autowiring
- Host: GitHub
- URL: https://github.com/mqwerty/dependency-injection
- Owner: mqwerty
- License: mit
- Created: 2020-07-04T09:59:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-21T01:01:33.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T05:43:51.821Z (9 months ago)
- Topics: dependency-injection, php, psr-11
- Language: PHP
- Homepage:
- Size: 157 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Test](https://github.com/mqwerty/dependency-injection/workflows/Test/badge.svg)](https://github.com/mqwerty/dependency-injection/actions?query=workflow%3ATest)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mqwerty_dependency-injection&metric=alert_status)](https://sonarcloud.io/dashboard?id=mqwerty_dependency-injection)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=mqwerty_dependency-injection&metric=coverage)](https://sonarcloud.io/dashboard?id=mqwerty_dependency-injection)
[![Minimum PHP Version](https://img.shields.io/packagist/php-v/mqwerty/dependency-injection)](https://php.net/)
[![Latest Stable Version](https://img.shields.io/packagist/v/mqwerty/dependency-injection)](https://packagist.org/packages/mqwerty/dependency-injection)Simple PSR-11 DI container with autowiring
```php
'info',
'shared' => [LoggerInterface::class],
LoggerInterface::class => fn($c) => (new Logger('log'))->pushHandler(
new StreamHandler(STDERR, $c->get('logLevel'))
),
];$container = new Mqwerty\DI\Container($config);
$container->get(Foo::class);
```