Skip to content
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

MissingDependency in phpunit dependencies #80

Closed
celosauro opened this issue Jul 26, 2020 · 3 comments
Closed

MissingDependency in phpunit dependencies #80

celosauro opened this issue Jul 26, 2020 · 3 comments

Comments

@celosauro
Copy link

The following error occours:

ERROR: MissingDependency - tests/myTest.php - PHPUnit\Framework\MockObject\Builder\InvocationMocker depends on class or interface phpunit\framework\mockobject\builder\parametersmatch that does not exist (see https://psalm.dev/157)
        $aMock->expects($this->never())

The components from error

vendor/phpunit/phpunit/src/Framework/MockObject/Builder/
├── Identity.php
├── InvocationMocker.php
├── InvocationStubber.php
├── Match.php
├── MethodNameMatch.php
├── ParametersMatch.php
└── Stub.php

0 directories, 7 files

Psalm.xml config

    <projectFiles>
        <directory name="src"/>
        <directory name="tests"/>
        <ignoreFiles>
            <directory name="vendor"/>
        </ignoreFiles>
    </projectFiles>
    <plugins>
        <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
    </plugins>

Info

  • Psalm version: Psalm 3.12.2@7c7ebd068f8acaba211d4a2c707c4ba90874fa26
  • PHPUnit version: "phpunit/phpunit": "^9.1.4"
  • PHPUnit plugin psalm: "psalm/plugin-phpunit": "^0.10.1"
@weirdan
Copy link
Member

weirdan commented Jul 26, 2020

Does it happen if you downgrade nikic/php-parser to 4.6?

@celosauro
Copy link
Author

@weirdan

after downgrade/update, checked:

  • nikic/php-parser: 4.4 - works fine
  • nikic/php-parser: 4.6 - works fine
  • nikic/php-parser: 4.7 - The problem related in this thread

@celosauro
Copy link
Author

The following related issues:

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

No branches or pull requests

2 participants