Skip to content

[QUESTION] phpstrom 单元测试,request 没有自动注入 #7700

Open

Description

@ipuppy2

环境: mac(物理机)
hyperf: 3.1.63
php: 8.2
swoole: swoole-6.1.6

表现:
报错: Typed property App\Controller\AbstractController::$request must not be accessed before initialization

Image

代码:
代码是通过 composer create-project hyperf/hyperf-skeleton 的例子,代码逻辑没有做修改。
ExampleTest

Image

IndexController

Image Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions