Phpstan: Wrong namespace resolution with 0.12.38

Created on 24 Aug 2020  路  2Comments  路  Source: phpstan/phpstan

Bug report


I'm using nunomaduro/larastan, my phpstan/phpstan version was 0.12.38 and I got the following bug with namespace resolution.

------ ------------------------------------------------------------------ 
  Line   Domains/Mongo/MongoManager.php                                    
 ------ ------------------------------------------------------------------ 
  139    Method App\Domains\Mongo\MongoManager::executeBulkWrite() should  
         return MongoDB\Driver\WriteResult but returns                     
         _HumbugBoxadd759dbc574\MongoDB\Driver\WriteResult.                
  139    Parameter #2 $bulk of method                                      
         MongoDB\Driver\Manager::executeBulkWrite() expects                
         _HumbugBoxadd759dbc574\MongoDB\Driver\BulkWrite,                  
         MongoDB\Driver\BulkWrite given.                                   
 ------ ------------------------------------------------------------------

Solution for me was to rollback to version 0.12.37.

Code snippet that reproduces the problem

I managed to get a similar bug inside phpstan.org

https://phpstan.org/r/e1dde1d7-a8bb-4568-93d2-3cddcb814172

Expected output


No Errors!

Most helpful comment

All 2 comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silverqx picture silverqx  路  31Comments

umpirsky picture umpirsky  路  38Comments

enumag picture enumag  路  24Comments

SignpostMarv picture SignpostMarv  路  24Comments

JanTvrdik picture JanTvrdik  路  27Comments