netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

PHP: removed built-in type real

Open troizet opened this issue 1 year ago • 3 comments

The main purpose of this PR is to fix the situation where NetBeans generates a real type and uses it as a native return type.

In this PR:

  • deleted the built-in type real (php does not have a built-in real type: https://www.php.net/manual/en/language.types.intro.php Also see the warning under "Scalar Types": https://www.php.net/manual/en/language.types.declarations.php)
  • fixed broken tests
  • new tests added
  • fixes generation of return type real instead of float for a method when overriding a base class method with an autocomplete
  • fixes generation of return type real instead of float for a function in phpDoc

This PR is similar to #5294.

troizet avatar May 20 '24 16:05 troizet

@mbien Can I ask for the tests to be restarted? I don't have the ability to set the label before creating the PR.

troizet avatar May 20 '24 17:05 troizet

Note: If we already did something similar in #5294, then it is unfortunate, as I explained above. Ideally, we should revert the API change and follow the steps I described.

OTOH, not sure how many plugins exist that are affected by this change and therefore can be broken. Also, the fix should be easy, but we must avoid of such API changes, definitely.

CC @junichi11

tmysik avatar May 21 '24 10:05 tmysik

Note: If we already did something similar in #5294, then it is unfortunate, as I explained above. Ideally, we should revert the API change and follow the steps I described.

By similarity to #5294, I was referring to the purpose of that PR. If I understood it correctly, there were no changes to the public api in that PR.

troizet avatar Jun 30 '24 07:06 troizet

Made the suggested corrections.

troizet avatar Jul 04 '24 13:07 troizet

@junichi11 Forgot to set milestone for this PR, or is it optional? Thank you!

troizet avatar Jul 05 '24 15:07 troizet