Skip to content

missing rector/rector-phpunit dependency #238

@fbuchlak

Description

@fbuchlak

Symplify\PHPStanRules\Rules\PHPUnit\NoDoubleConsecutiveTestMockRule uses Rector\PHPUnit\Enum\PHPUnitClassName. This class is not pulled with composer dependecies. The issue is:

root@3b45e651e0d9:/app# ./vendor/bin/phpstan analyze
Note: Using configuration file /app/phpstan.neon.dist.
 19/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 -- ----------------------------------------------------------------------------------------------------------------------
     Error
 -- ----------------------------------------------------------------------------------------------------------------------
     Internal error: Class "Rector\PHPUnit\Enum\PHPUnitClassName" not found while analysing file /app/tests/IndexTest.php

     Run PHPStan with -v option and post the stack trace to:
     https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml

 -- ----------------------------------------------------------------------------------------------------------------------

possible solutions:

  • replace PHPUnitClassName::TEST_CASE with actual phpunit class name (this might be a better option as it's the only class used from rector/rector-phpunit)
  • require rector/rector-phpunit as dev dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions