Skip to content

[4.x] Move support for stringifying phpunit exceptions into an extension #1746

@acoulton

Description

@acoulton

The PHPUnitExceptionStringer is impossible to test properly, and causes static analysis issues, because we do not have a tightly defined runtime dependency on PHPUnit. Therefore we have to guess at how to handle PHPUnit exceptions based on sniffing classes that are known to exist in different phpunit versions.

We are also still attempting to support PHPUnit versions that have been dead for a long time.

And we know that using PHPUnit assertions within Behat is not officially supported in newer versions of PHPUnit.

We should remove this functionality from core in 4.0, in favour of shipping a separate behat-phpunit-extension which can have a hard dependency on the phpunit version(s) it supports. This might also let us ship a workaround for #1618 - and it will let us make it much clearer to end users that they are depending on phpunit functionality that is not guaranteed to work outside phpunit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions