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
Set::map()
unknown even though it's in the stub
#6373
Comments
PHPStan stub files are only for overriding PHPDocs. They're not for creating new methods. The method is either missing in https://github.com/phpstan/phpstan-src/blob/master/resources/functionMap.php or https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php or both. |
Didn't help, needs to be in phpstorm-stubs too. |
Preparing the PR rn
… On 15. 1. 2022, at 15:26, Ondřej Mirtes ***@***.***> wrote:
Didn't help, needs to be in phpstorm-stubs too.
—
Reply to this email directly, view it on GitHub <#6373 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACQAJMAEOV2DJQOTYPUZT3UWF73FANCNFSM5MA5U4DA>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.
|
Crosslinks: |
@simPod After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-PHP 8.0 – 8.1 (1 error)
+PHP 8.0 – 8.1
==========
-11: Call to an undefined method Ds\Set<Stringable>::map().
+No errors
-PHP 7.1 – 7.4 (2 errors)
+PHP 7.1 – 7.4 (1 error)
==========
- 9: Parameter $ids of method A::x() has invalid type Stringable.
-11: Call to an undefined method Ds\Set<Stringable>::map().
+ 9: Parameter $ids of method A::x() has invalid type Stringable. Full reportPHP 8.0 – 8.1No errors PHP 7.1 – 7.4 (1 error)
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
PHPStan says the
\Ds\Set::map()
does not existsI see the method is there https://github.com/phpstan/phpstan-src/blob/e40eff0a8e34ceae776e38d48a31efbe67ea399a/stubs/ext-ds.stub#L686-L692 added in phpstan/phpstan-src#855
Code snippet that reproduces the problem
https://phpstan.org/r/9b25b205-df92-41a2-8acb-5b28419faf6e
Expected output
No errors
The text was updated successfully, but these errors were encountered: