phpactor / container
Phpactor's DI Container
Installs: 174 505
Dependents: 37
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: ^8.1
- phpactor/map-resolver: ^1.4
- psr/container: ^1.0||^2.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.0
- friendsofphp/php-cs-fixer: ^3.0
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0
README
Phpactor's minimal PSR-compliant dependency injection container, featuring tags and parameters
$container = new PhpactorContainer([ 'param1' => 'value1', 'param2' => 'value2', // ... ]); $container->register('Foobar', function (Container $container) { return new MyClass( $container->get(SomeOtherClass::class), $container->getParameter('param1') ); };
Contributing
This package is open source and welcomes contributions! Feel free to open a pull request on this repository.
Support
- Create an issue on the main Phpactor repository.
- Join the
#phpactor
channel on the Slack Symfony Devs channel.