Skip to content

[PHPUnit Bridge] Listeners are not supported with PHPUnit 10+ #21637

@alexislefebvre

Description

@alexislefebvre

About this section: https://symfony.com/doc/current/components/phpunit_bridge.html#deprecation-notices-at-autoloading-time

PHPUnit 12 shows a warning:

There was 1 PHPUnit test runner warning:

1) Test results may not be as expected because the XML configuration file did not pass validation:

  Line 44:
  - Element 'listeners': This element is not expected.

The listeners section existed with PHPUnit 9.6: https://github.com/sebastianbergmann/phpunit/blob/a7f6e324d064fca56446b85b71318d51d1a94316/phpunit.xsd#L268

It looks like it was removed in PHPUnit 10+: https://github.com/sebastianbergmann/phpunit/blob/10.5/phpunit.xsd

Ideas:

  • Add a warning that it require PHPUnit <= 9.6
  • Remove this whole section

Update: the section https://symfony.com/doc/current/components/phpunit_bridge.html#installation suggests to use xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd" which is very old now.

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