Home » Text » Text_Diff
Engine for performing and rendering text diffs
This package is unmaintained.
Download latest release 1.2.3 (there might be newer Composer installable version)
License: LGPL
Description
This package provides a text-based diff engine and renderers for multiple diff output formats.
Documentation
Maintainers
- Chuck Hagenbuch (chagenbu) — lead, inactive
- Jan Schneider (yunosh) — lead, inactive
- Paul M Jones (pmjones) — lead, inactive
Dependencies
Required
- PHP (>= 5.3.0)
- PEAR Installer (>= 1.9.0)
Optional
- xdiff (extension)
Releases
- 1.2.3 (stable, 2024-03-10)
Release notes
License: LGPL
PR #6: Fix: Do not use strings as arguments to assert()
PR #7: Fix: Do not use each()
PR #8: Fix Deprecated: Creation of dynamic property + loops for $matches - 1.2.2 (stable, 2017-03-08)
Release notes
License: LGPL
* Fully use PHP5 constructors
* Make statically called method static - 1.2.1 (stable, 2015-09-18)
Release notes
License: LGPL
* Use PHP5 style class constructors [cweiske]
* Fix strict standards error messages for PHP 5.6 [Julien Boulen] - 1.2.0 (stable, 2015-07-16)
Release notes
License: LGPL
* Add PHP 7 compatibility; drop PHP 4 compatibility
- 1.1.1 (stable, 2009-07-24)
Release notes
License: LGPL
* Make sure that the diff string ends with a line break (PEAR Bug #14533).
* Fix notices if xdiff engine creates empty lines (PEAR Bug #16240).
* Fix inline renderer if xdiff extension is installed. - 1.1.0 (stable, 2008-09-10)
Release notes
License: LGPL
* Add countAddedLines() and countDeletedLines() methods (Christian King, PEAR Request #13183).
* Improve string engine if patch data has no header (PEAR Bug #14533).
* Fix autodetection of diff type in string engine (PEAR Bug #14625). - 1.0.0 (stable, 2008-01-31)
Release notes
License: LGPL
* Stable release; final non-bugfix PHP 4 release.
- 0.3.2 (beta, 2008-01-04)
Release notes
License: LGPL
* Fixed assertion in the native engine with PHP 5 (PEAR Bug #12740).
- 0.3.1 (beta, 2007-10-28)
Release notes
License: LGPL
* Fixed off-by-one errors with line numbers in default renderer output (Milian Wolff, PEAR Bugs #7839, #12111).
* Restore compatibility with PHP 4 in the shell diff engine. - 0.3.0 (beta, 2007-09-20)
Release notes
License: LGPL
* Converted to package.xml 2.0.
* Added context diff renderer.
* Stripped nul characters to avoid infinite loops (PEAR Bug #7921).
* Fix assertion with PHP 5 (PEAR Bug #10423).
* Add shell diff engine (Milian Wolff, PEAR Request #12051). - 0.2.1 (beta, 2006-02-05)
- 0.2.0 (beta, 2006-01-06)
Release notes
License: LGPL
* Fix reference warnings with PHP 4.4 and PHP 5.1.
* Fix too many trailing context lines for the last diff chunk. (PEAR Bug #6251).
* Add diff engine for existing diffs/patches (Örjan Persson, PEAR Request #5373).
* Fix problems with numbers, whitespace-only changes and the inline renderer (PEAR Bug #6428. - 0.1.1 (beta, 2005-08-19)
- 0.1.0 (beta, 2005-08-16)
- 0.0.5 (beta, 2005-05-04)
Release notes
License: LGPL
* Fixed variable name in Text_MappedDiff.
* Removed output buffering code.
* Fixed additional empty lines being added with the inline renderer (Bug 3730).
* Fixed multiple calls to _endBlock per block (Bug 4065). - 0.0.4 (beta, 2004-10-13)
Release notes
License: LGPL
* Generalized Diff Renderer parameter handling.
* Added an inline renderer contributed by Ciprian Popovici (ciprian@zuavra.net).
* Fixed PHPDoc.
* Fixed a PHP 5 incompatibility. - 0.0.3 (beta, 2004-05-13)
Release notes
License: LGPL
Renamed final() and orig() methods to avoid conflict with final keyword in PHP5
- 0.0.2 (alpha, 2004-04-21)
Release notes
License: LGPL
Added optional xdiff support
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #1397 | Closed | Bug | 2004-05-13 | final is a reserved keyword in php 5 | |
| #2178 | Closed | Req | 2004-08-20 | Question about class naming and PHP QA int Text_Diff | |
| #2506 | Closed | Bug | 2004-10-11 | all @param tags have the order reversed | |
| #2507 | Closed | Bug | 2004-10-11 | CRITICAL: diff renderer fails in all cases in PHP5 because of get_class() | |
| #3730 | Closed | Bug | 2005-03-07 | New lines being added in Text_Diff_Renderer_inline | |
| #4065 | Closed | Bug | 2005-04-05 | Renderer calls _endBlock for every edit | |
| #4300 | Bogus | Bug | 2005-05-06 | strange diff result | |
| #4301 | Duplicate | Req | 2005-05-06 | tags not closed | |
| #4549 | Closed | Bug | 2005-06-08 | parameters not passed correctly in Renderer::getParams() | |
| #4879 | Closed | Bug | 2005-07-22 | Text_Diff_Renderer_inline hangs on numbers in input string | |
| #4982 | Open | Req | 2005-08-03 | diff on a little bit wrong place with inline renderer | |
| #5108 | Closed | Bug | 2005-08-16 | packages does not install without giving the exact url | |
| #5152 | Closed | Bug | 2005-08-19 | Inline checking fails in versions earlier than 4.3.0 | |
| #5373 | Closed | Req | 2005-09-12 | Engine that handles existing diffs/patches | |
| #5472 | No Feedback | Req | 2005-09-21 | inline renderer always encodes html entities forcefully, should be controllable | |
| #6251 | Closed | Bug | 2005-12-15 | Unified diffs get too much trailing context | |
| #6265 | Closed | Bug | 2005-12-16 | native_engine does not detect whitespace changes | |
| #6359 | Open | Req | 2005-12-28 | Ignore whitespace | |
| #6428 | Closed | Bug | 2006-01-06 | Problem with single digits after space | |
| #6440 | Closed | Bug | 2006-01-07 | require Text/Diff/Renderer.php in inline.php | |
| #6699 | Closed | Bug | 0.2.0 | 2006-02-05 | Text_Diff::reverse() wrong arument for clone |
| #7839 | Closed | Bug | 0.2.1 | 2006-06-08 | wrong output by render function of Renderer.php |
| #7921 | Closed | Bug | 2006-06-16 | inline renderer hangs indefinitely on strings with \0 | |
| #8096 | No Feedback | Req | 0.2.1 | 2006-07-01 | diff generated is wrong. |
| #8495 | Bogus | Bug | 0.2.1 | 2006-08-17 | deprecated coding practices causing annoying warning messages |
| #10423 | Closed | Bug | 0.2.1 | 2007-03-20 | Assert on line 202 (file: native.php) fails for no apparent reason |
| #11254 | Closed | Bug | 0.2.1 | 2007-06-09 | strict-mode warnings for reverse() |
| #11963 | Bogus | Bug | 0.2.1 | 2007-09-02 | package totally broken |
| #12051 | Closed | Req | 0.2.1 | 2007-09-13 | New "shell" engine which uses gnu diff directly via shell_exec |
| #12091 | Suspended | Req | CVS | 2007-09-20 | remove some PHP 5 Strict messages |
| #12111 | Closed | Req | CVS | 2007-09-25 | Default renderer sets wrong line number for deleted lines |
| #12433 | Bogus | Bug | 0.3.1 | 2007-11-13 | Misaligned replacement array? |
| #12579 | Closed | Bug | 0.3.1 | 2007-12-02 | license clarification needed |
| #12740 | Closed | Bug | 0.3.1 | 2007-12-20 | Failed assertion in Text_diff |
| #13184 | Duplicate | Req | CVS | 2008-02-23 | 2 New Functions for Text_Diff |
| #14494 | Duplicate | Req | 1.0.0 | 2008-08-12 | No option to not use htmlspecialcharacters with inline renderer. |
| #14533 | Closed | Bug | 1.0.0 | 2008-08-20 | No output when comparing two one-line strings using 'string' engine |
| #14625 | Closed | Bug | 1.0.0 | 2008-09-09 | Autodetect mode in string.php contains incorrect logic |
| #16240 | Closed | Bug | 1.1.0 | 2009-05-19 | Referencing array in place of string in xdiff.php |
| #16442 | Bogus | Bug | 1.1.0 | 2009-07-16 | Various notices |
| #16470 | Wont fix | Req | 1.1.1 | 2009-07-24 | Patching capability |
| #16552 | Duplicate | Bug | 1.1.1 | 2009-08-29 | not expected diff output when a line splitted in two lines |
| #16562 | Bogus | Bug | 1.1.1 | 2009-09-02 | inline renderer shows too much text as changed |
| #16564 | Bogus | Bug | 1.1.1 | 2009-09-02 | inline renderer switches words and lines split level |
| #16662 | Bogus | Bug | 1.1.1 | 2009-09-30 | Triggers E_STRICT error messages |
| #16774 | Open | Req | 1.1.1 | 2009-11-10 | Word boundaries are insufficient for inline differ |
| #16965 | Open | Req | 1.1.1 | 2010-01-03 | Formatting output of context- and unified-diff |
| #17000 | Bogus | Bug | 1.1.1 | 2010-01-15 | The package uses depracated php functions |
| #17090 | Bogus | Bug | Unknown | 2010-02-12 | PHP array_walk OOP issue |
| #17502 | Open | Bug | 1.1.1 | 2010-06-18 | Text_Diff3 merge conflicts without reason |
| #17620 | Open | Req | 1.1.1 | 2010-07-22 | Trimming newlines should not be done by the engines |
| #17630 | Bogus | Bug | 1.1.1 | 2010-07-25 | Deprecated errors on referenced return values |
| #17782 | Closed | Bug | 1.1.1 | 2010-08-21 | package.xml refers xdiff as extension, not pecl package |
| #18098 | Wont fix | Req | 1.1.1 | 2010-12-06 | Support modern PHP |
| #18116 | Duplicate | Req | 1.1.1 | 2010-12-14 | PHP5 compatibility |
| #19771 | Wont fix | Bug | 1.1.1 | 2013-01-03 | Deprecated notices under PHP 5.3 |
| #21055 | Wont fix | Bug | 1.2.1 | 2016-04-20 | PHP7: Methods with the same name as their class will not be constructo |