-
Notifications
You must be signed in to change notification settings - Fork 544
Revert "Cleanup instanceof Type checks"
#4458
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
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
looks like this fix regresses phpstan/phpstan#8372 which was fixed recently
see https://github.com/phpstan/phpstan-src/actions/runs/18634779784#summary-53124523776
This partially reverts commit 3b72271.
@takaram
takaram
force-pushed
the
bug-13694
branch
from
October 23, 2025 10:56
5e5ab7a to
457de4e
Compare
@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
------ ---------------------------------------
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This partially reverts 3b72271 (#4380).
Closes phpstan/phpstan#13694