friendsofhyperf / config-anyway
Config extension for Hyperf.
Fund package maintenance!
huangdijia
hdj.me/sponsors
Requires
- php: >=8.0
- hyperf/config-center: ~3.0.0
- hyperf/utils: ~3.0.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- hyperf/di: ~3.0.0
- hyperf/framework: ~3.0.0
- hyperf/testing: ~3.0.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.0|^10.0
- swoole/ide-helper: ^4.5
README
Installation
composer require friendsofhyperf/config-anyway
Publish
php bin/hyperf.php vendor:publish friendsofhyperf/config-anyway
Configure
// config/autoload/config_center.php return [ 'drivers' => [ 'driver' => FriendsOfHyperf\ConfigAnyway\AnywayDriver::class, 'mapping' => [ 'key1' => function() { return []; }, 'key2' => App\Source\ArrayHandler::class, // need __invoke() 'key3' => [App\Source\ArrayHandler::class, '__invoke'], ], ] ];