catfishphp / container
Lightweight DI container
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 4
Forks: 6
Open Issues: 0
pkg:composer/catfishphp/container
Requires
- php: ^7.1.3
- psr/container: ^1.0
- tightenco/collect: ^5.6
Requires (Dev)
- phpunit/phpunit: ^7.1
- squizlabs/php_codesniffer: 3.*
This package is not auto-updated.
Last update: 2025-10-18 02:00:45 UTC
README
This package is compliant with PSR-1, PSR-2 and PSR-4. If you notice compliance oversights, please send a patch via pull request.
Install
Via Composer
$ composer require catfishphp/container
Requirements
The following versions of PHP are supported by this version.
- PHP 7.1
- PHP 7.2
Usage
<?php $container = new Catfish\Container\Container; // add a service to the container $container->add('service', 'Acme\Service\SomeService'); // retrieve the service from the container $service = $container->get('service'); var_dump($service instanceof Acme\Service\SomeService); // true
Testing
$ vendor/bin/phpunit
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.