phpstan-src
phpstan-src copied to clipboard
Revert "Cleanup `instanceof Type` checks"
This partially reverts 3b72271648184ebc0cc3fa215ac355e6315f10cc (#4380).
Closes phpstan/phpstan#13694
looks like this fix regresses https://github.com/phpstan/phpstan/issues/8372 which was fixed recently see https://github.com/phpstan/phpstan-src/actions/runs/18634779784#summary-53124523776
@staabm
Was it really fixed? I tested on latest 2.1.x and still see the error Cannot access an offset on mixed.
Was it really fixed?
hmm seems you are right. even on the latest dev-2.1.x it does not look fixed. maybe a issue-bot bug then.
➜ phpstan-src git:(2.1.x) ✗ php bin/phpstan analyze test.php --debug --level=10
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port).
! [NOTE] The Xdebug PHP extension is active, but "--xdebug" is not used.
! The process was restarted and it will not halt at breakpoints.
! Use "--xdebug" if you want to halt at breakpoints.
Note: Using configuration file /Users/m.staab/dvl/phpstan-src/phpstan.neon.dist.
/Users/m.staab/dvl/phpstan-src/test.php
------ ---------------------------------------
Line test.php
------ ---------------------------------------
2 Class Test must be abstract or final.
🪪 phpstan.finalClass
at test.php:2
21 Cannot access an offset on mixed.
🪪 offsetAccess.nonOffsetAccessible
at test.php:21
22 Cannot access an offset on mixed.
🪪 offsetAccess.nonOffsetAccessible
at test.php:22
------ ---------------------------------------