Skip to content

Latest commit

 

History

History
19 lines (19 loc) · 775 Bytes

README.md

File metadata and controls

19 lines (19 loc) · 775 Bytes

Hyperf-Di-Heighten

作用

解决Hyperf2.1 版本Inject 或 Value 注解不生效

使用

修改confg/autoload/annotations.php

<?php
return [
    'scan' => [
        ...
        // scan 增加class_map
        'class_map' => [
            Hyperf\Di\Resolver\ObjectResolver::class => BASE_PATH . '/vendor/assert6/hyperf-di-heighten/classmap/ObjectResolver.php',
            Hyperf\Di\Annotation\Inject::class => BASE_PATH . '/vendor/assert6/hyperf-di-heighten/classmap/Inject.php',
            Hyperf\Di\Annotation\Scanner::class => BASE_PATH . '/vendor/assert6/hyperf-di-heighten/classmap/Scanner.php',
        ],
    ],
];