-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
Milestone
Description
Bug report
Starting with the latest phpstan release the following fix is needed: https://github.com/atk4/ui/pull/1657/files
But I belive it is wrong as class-string|string type should be simplified to string as before.
Also, as shown in the code snippet below, it is still/correctly simplified when declared as phpdoc.
Code snippet that reproduces the problem
https://phpstan.org/r/7757dd83-d27f-4978-88fc-ff5dea43fcc8
https://github.com/atk4/ui/actions
Expected output
Line | Error
-- | --
- 8 | Property Cl::$u (A\|null) does not accept default value of type array<int\|string, class-string\|string>.
+ 8 | Property Cl::$u (A\|null) does not accept default value of type array<int\|string, string>.
20 | Parameter #1 $x of method Cl::mm() expects array<int\|string, string>, null given.