Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eliseacornejo opened this issue Feb 14, 2022 · 3 comments · Fixed by #1044
Closed

Comments

@eliseacornejo
Copy link

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
@bohdan-harniuk bohdan-harniuk self-assigned this Feb 14, 2022
@bohdan-harniuk
Copy link
Collaborator

Hello, @eliseacornejo!

Thank you for your report!
We'll try to figure out how to fix that.

Regards,

@bohdan-harniuk bohdan-harniuk removed their assignment Feb 14, 2022
@bohdan-harniuk bohdan-harniuk self-assigned this Mar 19, 2022
@bohdan-harniuk bohdan-harniuk changed the title Error is not displayed if the generated class of the method called exists [UCT] Error is not displayed if the generated class of the method called exists Mar 19, 2022
@bohdan-harniuk
Copy link
Collaborator

Hello, @eliseacornejo!

I've successfully reproduced this bug.

Before running dependencies compilation:

Screenshot 2022-03-19 at 13 45 28

Screenshot 2022-03-19 at 13 44 52

After:

Screenshot 2022-03-19 at 13 49 05

Thank you, for a such detailed description of the bug.

Regards,

@bohdan-harniuk
Copy link
Collaborator

Hello, @eliseacornejo!

This issue is fixed and it will be delivered in the upcoming release: 4.3.0.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants