Skip to content

How to correctly configure that exclude-from-classmap is kept in mind #983

@alexander-schranz

Description

@alexander-schranz

I wanted to give this tool a try but I have some issues that it analyse "test" files:

Following error happening:

  [Roave\BetterReflection\Reflector\Exception\IdentifierNotFound]
  Roave\BetterReflection\Reflection\ReflectionClass "Sulu\Component\Util\Tests\Unit\FoobarTestClass" could not be found in the located source

The file is inside src/Sulu/Component/Util/Tests/Unit/SortUtilsTest.php.

Which should in my opinion not being analyzed as it not part of composer.json autoloader:

    "autoload": {
        "psr-0": {
            "Sulu\\": "src/"
        },
        "exclude-from-classmap": [
            "src/Sulu/Component/*/Tests/",
            "src/Sulu/Bundle/*/Tests/",
            "src/Sulu/Bundle/*/Resources/phpcr-migrations"
        ]
    },

Did I miss something. I run the check with following command, without a custom config:

vendor/bin/roave-backward-compatibility-check --from=2.6 --install-development-dependencies

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions