Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1315

Psalm job failure: ParamNameMismatch & MethodSignatureMismatch

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.1
    • Affects Version/s: None
    • Component/s: Tests
    • None

      psalm job if failing since this commit on master: https://github.com/mongodb/mongo-php-library/commit/b455ab7c20ce337653efe39afed19b8a37c0ff5a

      It was not failing the day before, on the merged PR.

      Error: src/Model/CollectionInfo.php:182:31: ParamNameMismatch: Argument 1 of MongoDB\Model\CollectionInfo::offsetSet has wrong name $key, expecting $offset as defined by ArrayAccess::offsetSet (see https://psalm.dev/230)
      Error: src/Model/DatabaseInfo.php:124:31: ParamNameMismatch: Argument 1 of MongoDB\Model\DatabaseInfo::offsetSet has wrong name $key, expecting $offset as defined by ArrayAccess::offsetSet (see https://psalm.dev/230)
      Error: src/Model/IndexInfo.php:223:31: ParamNameMismatch: Argument 1 of MongoDB\Model\IndexInfo::offsetSet has wrong name $key, expecting $offset as defined by ArrayAccess::offsetSet (see https://psalm.dev/230)
      Error: src/PsrLogAdapter.php:93:29: ParamNameMismatch: Argument 1 of MongoDB\PsrLogAdapter::log has wrong name $mongocLevel, expecting $level as defined by MongoDB\Driver\Monitoring\LogSubscriber::log (see https://psalm.dev/230)
      Error: src/PsrLogAdapter.php:93:29: MethodSignatureMismatch: Argument 1 of MongoDB\PsrLogAdapter::log has wrong type 'int', expecting 'mixed' as defined by MongoDB\Driver\Monitoring\LogSubscriber::log (see https://psalm.dev/042)
      Error: src/PsrLogAdapter.php:93:50: MethodSignatureMismatch: Argument 2 of MongoDB\PsrLogAdapter::log has wrong type 'string', expecting 'mixed' as defined by MongoDB\Driver\Monitoring\LogSubscriber::log (see https://psalm.dev/042)
      Error: src/PsrLogAdapter.php:93:66: MethodSignatureMismatch: Argument 3 of MongoDB\PsrLogAdapter::log has wrong type 'string', expecting 'mixed' as defined by MongoDB\Driver\Monitoring\LogSubscriber::log (see https://psalm.dev/042)
      ------------------------------
      7 errors found
      ------------------------------

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: