sebastian/diff
Standalone PHP diff library extracted from PHPUnit. Generate textual diffs between strings with configurable output builders (unified, strict unified, diff-only) or custom formats, and parse unified diffs into an object model for further processing.
UnifiedDiffOutputBuilder and AbstractChunkOutputBuilder classes have been removed, use StrictUnifiedDiffOutputBuilder insteadSebastianBergmann\Diff\LongestCommonSubsequenceCalculator interface, its two implementations SebastianBergmann\Diff\TimeEfficientLongestCommonSubsequenceCalculator and SebastianBergmann\Diff\MemoryEfficientLongestCommonSubsequenceCalculator, and the $lcs parameter of SebastianBergmann\Diff\Differ::diff() and SebastianBergmann\Diff\Differ::diffToArray() have been removedUnifiedDiffOutputBuilder now accepts a fourth $emitNoLineEndEofWarning constructor parameter (default true) to suppress the \ No newline at end of file marker for use cases such as PHPUnit comparison failures that are not related to filesStrictUnifiedDiffOutputBuilder now accepts the options addLineNumbers, emitDiffLineEndWarning, emitNoLineEndEofWarning, and headerUnifiedDiffOutputBuilder now returns an empty string when no difference is detected (previously: returned the header)UnifiedDiffOutputBuilder::writeHunk() now writes the actual \ No newline at end of file marker text (previously: wrote only a line break) and silently skips diff entries with unknown typesSebastianBergmann\Diff\LongestCommonSubsequenceCalculator interface, its two implementations SebastianBergmann\Diff\TimeEfficientLongestCommonSubsequenceCalculator and SebastianBergmann\Diff\MemoryEfficientLongestCommonSubsequenceCalculator, and the $lcs parameter of SebastianBergmann\Diff\Differ::diff() and SebastianBergmann\Diff\Differ::diffToArray() are now deprecated; do not pass the $lcs parameter any more in preparation for the removal of these symbols and this parameter, respectivelyUnifiedDiffOutputBuilder behavior with StrictUnifiedDiffOutputBuilder$contextLines constructor parameter on UnifiedDiffOutputBuilderHow can I help you explore Laravel packages today?