Skip to content

Conversation

@takaram
Copy link
Contributor

@takaram takaram commented Oct 19, 2025

This partially reverts 3b72271 (#4380).

Closes phpstan/phpstan#13694

@staabm
Copy link
Contributor

staabm commented Oct 19, 2025

looks like this fix regresses phpstan/phpstan#8372 which was fixed recently
see https://github.com/phpstan/phpstan-src/actions/runs/18634779784#summary-53124523776

@takaram
Copy link
Contributor Author

takaram commented Oct 23, 2025

@staabm
Was it really fixed? I tested on latest 2.1.x and still see the error Cannot access an offset on mixed.

@staabm
Copy link
Contributor

staabm commented Oct 23, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive "Variable might not be defined" with array_key_exists and isset

2 participants