Skip to content

with latest phpstan version, issue with get_terms() definition #287

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

Open
jcvignoli opened this issue Apr 27, 2025 · 4 comments
Open

with latest phpstan version, issue with get_terms() definition #287

jcvignoli opened this issue Apr 27, 2025 · 4 comments

Comments

@jcvignoli
Copy link

Hi,

The latest PHPStan release seems to check @internal phpdoc comments.

get_terms() has such a comment, meant to address a parameter.

I believe it should be removed, since it makes phpstan to fail as soon as the function is used, with the following error:


 ------ ---------------------------------------- 
  126    Call to internal function get_terms().  
         🪪  function.internal                   
 ------ ------------------------
@szepeviktor
Copy link
Member

szepeviktor commented Apr 27, 2025

You could stop using bleeding edge, or disable that feature.

https://github.com/phpstan/phpstan-src/blob/2.1.x/conf/bleedingEdge.neon#L8

@jcvignoli
Copy link
Author

jcvignoli commented Apr 27, 2025

Thanks for your reply! Adding

    featureToggles:
        internalTag: false

to my phpstan config did the trick.

May I ask you the rational behind the phpdoc comment

* @internal The `$deprecated` parameter is parsed for backward compatibility only.

I may be wrong, but it doesn't sound to fit into @internal requirement.

@szepeviktor
Copy link
Member

John will fix it in core.

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

No branches or pull requests

2 participants