Skip to content

[PhpUnit] XML configuration validates against a deprecated schema #41409

@n0rbyt3

Description

@n0rbyt3

Symfony version(s) affected: >= 4.4

Description
The receipe for phpunit >= 4.7 cannot be used with PHPUnit 9 as it violates its XML schema. The filter section needs to get replaced with a coverage section.

How to reproduce

composer require --dev phpunit/phpunit "^9.5"

Possible Solution
A new receipe may be required for PHPUnit 9 which replaces

<filter>
    <whitelist processUncoveredFilesFromWhitelist="true">
        <directory suffix=".php">src</directory>
    </whitelist>
</filter>

with

<coverage processUncoveredFiles="true">
    <include>
        <directory suffix=".php">src</directory>
    </include>
</coverage>

Additional context
Running PHPUnit with the old configuration will show this warning:

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions