NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #39 most downloaded on Packagist
Diff implementation
Last release 1 months ago
25 Aug 2026
Release timing varies
gaps range from 3 weeks to 12 months
Most releases are documented
notes for 27 of 41 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
41 releases · first in 2013
Parser drops lines that look like file headers
The SebastianBergmann\Diff\LongestCommonSubsequenceCalculator interface, its two implementations SebastianBergmann\Diff\TimeEfficientLongestCommonSubs
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 removedOne column per quarter.
…are now deprecated; do not pass the $lcs parameter any more in preparation for the removal of these symbols and this parameter, respectively
UnifiedDiffOutputBuilder 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, respectivelyChanged #136 : Reverted changes introduced in version 8.2.0
Changed #136 : Align UnifiedDiffOutputBuilder behavior with StrictUnifiedDiffOutputBuilder
UnifiedDiffOutputBuilder behavior with StrictUnifiedDiffOutputBuilderAdded #135 : Add $contextLines constructor parameter on UnifiedDiffOutputBuilder
$contextLines constructor parameter on UnifiedDiffOutputBuilderThis component is no longer supported on PHP 8.3
Parser drops lines that look like file headers
This component is no longer supported on PHP 8.3
This project now uses PHPStan instead of Psalm for static analysis
Do not use implicitly nullable parameters
SebastianBergmann\Diff\Chunk::getStart(), SebastianBergmann\Diff\Chunk::getStartRange(), SebastianBergmann\Diff\Chunk::getEnd(), SebastianBergmann\Dif
SebastianBergmann\Diff\Chunk::getStart(), SebastianBergmann\Diff\Chunk::getStartRange(), SebastianBergmann\Diff\Chunk::getEnd(), SebastianBergmann\Diff\Chunk::getEndRange(), and SebastianBergmann\Diff\Chunk::getLines()SebastianBergmann\Diff\Diff::getFrom(), SebastianBergmann\Diff\Diff::getTo(), and SebastianBergmann\Diff\Diff::getChunks()SebastianBergmann\Diff\Line::getContent() and SebastianBergmann\Diff\Diff::getType()Do not use implicitly nullable parameters
SebastianBergmann\Diff\Chunk::start(), SebastianBergmann\Diff\Chunk::startRange(), SebastianBergmann\Diff\Chunk::end(), SebastianBergmann\Diff\Chunk::
SebastianBergmann\Diff\Chunk::start(), SebastianBergmann\Diff\Chunk::startRange(), SebastianBergmann\Diff\Chunk::end(), SebastianBergmann\Diff\Chunk::endRange(), and SebastianBergmann\Diff\Chunk::lines()SebastianBergmann\Diff\Diff::from(), SebastianBergmann\Diff\Diff::to(), and SebastianBergmann\Diff\Diff::chunks()SebastianBergmann\Diff\Line::content() and SebastianBergmann\Diff\Diff::type()SebastianBergmann\Diff\Line::isAdded(),SebastianBergmann\Diff\Line::isRemoved(), and SebastianBergmann\Diff\Line::isUnchanged()SebastianBergmann\Diff\Diff now implements IteratorAggregate, iterating over it yields the aggregated SebastianBergmann\Diff\Chunk objectsSebastianBergmann\Diff\Chunk now implements IteratorAggregate, iterating over it yields the aggregated SebastianBergmann\Diff\Line objectsSebastianBergmann\Diff\Chunk::getStart(), SebastianBergmann\Diff\Chunk::getStartRange(), SebastianBergmann\Diff\Chunk::getEnd(), SebastianBergmann\Diff\Chunk::getEndRange(), and SebastianBergmann\Diff\Chunk::getLines()SebastianBergmann\Diff\Diff::getFrom(), SebastianBergmann\Diff\Diff::getTo(), and SebastianBergmann\Diff\Diff::getChunks()SebastianBergmann\Diff\Line::getContent() and SebastianBergmann\Diff\Diff::getType()### Changed * #119: Improve performance of TimeEfficientLongestCommonSubsequenceCalculator
TimeEfficientLongestCommonSubsequenceCalculator### Changed * #118: Improve performance of MemoryEfficientLongestCommonSubsequenceCalculator
MemoryEfficientLongestCommonSubsequenceCalculator### Fixed * #115: Parser::parseFileDiff() does not handle diffs correctly that only add lines or only remove lines
Parser::parseFileDiff() does not handle diffs correctly that only add lines or only remove linesPassing a DiffOutputBuilderInterface instance to Differ::__construct() is no longer optional
DiffOutputBuilderInterface instance to Differ::__construct() is no longer optionalNothing published for this version
Nothing published for this version
SebastianBergmann\Diff\Exception now correctly extends \Throwable
SebastianBergmann\Diff\Exception now correctly extends \ThrowableChanged PHP version constraint in composer.json from ^7.3 || ^8.0 to >=7.3
composer.json from ^7.3 || ^8.0 to >=7.3This component is now supported on PHP 8
### Fixed * #99: Regression in unified diff output of identical strings
This component is no longer supported on PHP 7.1 and PHP 7.2
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Chunk::setLines() now ensures that the $lines array only contains Line objects
Chunk::setLines() now ensures that the $lines array only contains Line objectsRemoved "minimum-stability": "dev", from composer.json
"minimum-stability": "dev", from composer.jsonThe StrictUnifiedDiffOutputBuilder implementation of the DiffOutputBuilderInterface was added
StrictUnifiedDiffOutputBuilder implementation of the DiffOutputBuilderInterface was addedDiffOutputBuilderInterface implementation now generates context lines (unchanged lines)### Fixed * #66: Restored backwards compatibility for PHPUnit 6.1.4, 6.2.0, 6.2.1, 6.2.2, and 6.2.3
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →