Skip to content

[UCT] Error is not displayed if the generated class of the method called exists #984

@eliseacornejo

Description

@eliseacornejo

Describe the bug (*)

No error is displayed when calling a method of a class that was generated when compiling the code.

To Reproduce (*)

Steps to reproduce the behavior:

  1. Install a Magento project. In my case 2.4.2 version
  2. Compile it: bin/magento setup:di:compile
  3. Create some customised code like this for example:
public function match(\Magento\Framework\App\RequestInterface $request) {
        $info = $request->getPathInfo();
}
  1. Execute the phpstorm plugin. I tried 4.2.3 and 4.2.2
  2. Right now no error is displayed for the call of the method getPathInfo() ** as when the code was compiled, a proxy class was generated, with the method. But in this case, this is error should be displayed:

* [ERROR][1429] Line 33: Called method '\Magento\Framework\HTTP\PhpEnvironment\Request.getPathInfo' is not marked as an API

Expected behavior (*)
This is error should be displayed:

* [ERROR][1429] Line 33: Called method '\Magento\Framework\HTTP\PhpEnvironment\Request.getPathInfo' is not marked as an API

Please complete the following information: (*)

  • OS: MacOs
  • PhpStorm/Intellij version: 2021.2.4
  • Plugin Version: 4.2.3 and 4.2.2

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions