Skip to content

PHPUnit should not create a diff when expected or actual string are too large #4918

Open
@arnaud-lb

Description

@arnaud-lb
Q A
PHPUnit version 7.x
PHP version 7.1
Installation Method Composer

When comparing values that happen to not be equal, phpunit might try to display a nice diff. If the values are large enough, a memory-efficient implementation is used to compute the diff (MemoryEfficientLongestCommonSubsequenceCalculator).

The diff algorithm can take hours to compute a diff on accidentally large strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/performanceIssues related to resource consumption (time and memory)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions