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.
I managed to get a similar bug inside phpstan.org
https://phpstan.org/r/e1dde1d7-a8bb-4568-93d2-3cddcb814172
No Errors!
Fixed, thank you! https://github.com/phpstan/phpstan-src/commit/79bae4b17d9a1a38559127c90107bacbec6cb853
Will release 0.12.39 shortly.
And released :) https://github.com/phpstan/phpstan/releases/tag/0.12.39
Most helpful comment
And released :) https://github.com/phpstan/phpstan/releases/tag/0.12.39