-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Arrow closure param type hint is ignored #4681
Labels
Comments
@simPod After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
14: Parameter #1 $row of class A constructor expects array('a' => int), array given.
-PHP 7.4 (2 errors)
+PHP 7.4 (1 error)
==========
- 5: Promoted properties are supported only on PHP 8.0 and later.
-14: Parameter #1 $row of class A constructor expects array('a' => int), array given.
+-1: Internal error: Property $row was not found in reflection of class A.
+Run PHPStan with --debug option and post the stack trace to:
+https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md
PHP 7.1 – 7.3 (3 errors)
========== Full reportPHP 8.0 (1 error)
PHP 7.4 (1 error)
PHP 7.1 – 7.3 (3 errors)
|
@simPod After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-PHP 8.0 (1 error)
+PHP 8.0
==========
-14: Parameter #1 $row of class A constructor expects array('a' => int), array given.
+No errors
-PHP 7.4 (2 errors)
+PHP 7.4 (1 error)
==========
5: Promoted properties are supported only on PHP 8.0 and later.
-14: Parameter #1 $row of class A constructor expects array('a' => int), array given.
PHP 7.1 – 7.3 (3 errors)
========== Full reportPHP 8.0No errors PHP 7.4 (1 error)
PHP 7.1 – 7.3 (3 errors)
|
Epic, this will reduce half of my baseline 🙏🏿
…On Sat, Jun 26, 2021, 20:05 Ondřej Mirtes ***@***.***> wrote:
Closed #4681 <#4681> via
***@***.***
<phpstan/phpstan-src@5ffa79f>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4681 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQAJNE74TQANIUOH7CKT3TUYCFHANCNFSM4Y5PLZ4Q>
.
|
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
I'm typing the arrow closure as
Though PHPStan says I'm passing
array
intoA
, notarray{a: int}
.Code snippet that reproduces the problem
https://phpstan.org/r/1784556f-11c5-4874-984f-18b654932da5
The text was updated successfully, but these errors were encountered: