bud / depend
An annotation declaration that adapts to the hyperf framework to cover dependency relationships
v3.1.1
2024-09-19 13:43 UTC
Requires
- php: >=8.1
- hyperf/di: ^3.1
- hyperf/event: ^3.1
- hyperf/framework: ^3.1
This package is auto-updated.
Last update: 2024-10-19 13:51:42 UTC
README
适配 hyperf 框架的注解依赖器,支持权重并且同步兼容配置文件依赖
安装
composer require bud/depend
使用方法
当配置文件中配置了相同接口的映射并且权重高于注解声明的权重时,则注解无效
<?php declare(strict_types=1); namespace App\Service; use App\TestInterface; use Bud\Depend\Annotation\Depend; #[Depend(TestInterface::class,2)] class TestService3 implements TestInterface { public function aa(): int { return 5645645645645645; } }