Debian Codegraph @

vendor/jfcherng/php-diff/UPGRADING/UPGRADING_v5.md

raw
1 ## Upgrading to v5
2
3 - Names involving `a, b`, `from, to`, `base, changed` have been renamed to `old, new` for consistency.
4 Here's some examples:
5
6 - `Diff::setAB()` becomes `Diff::setOldNew()`.
7 - `Diff::setA()` becomes `Diff::setOld()`.
8 - `Diff::setB()` becomes `Diff::setNew()`.
9 - `Diff::getA()` becomes `Diff::getOld()`.
10 - `Diff::getB()` becomes `Diff::getNew()`.
11 - `base`, `changed` keys in the result of the `Json` renderer have become `old`, `new`.
12
13 - In the result of HTML renderers, classes of rows of line numbers has been changed.
14 You may have to change your CSS if you have some customized things depend on these.
15
16 - `<th class="f-num">` (from-number) becomes `<th class="n-new">` (number-new).
17 - `<th class="t-num">` (to-number) becomes `<th class="n-old">` (number-old).
18
19 - The `tag` (sometimes called `op`) in `Json` template is now in `int` form by default.
20 To get previous behavior, set the renderer option `outputTagAsString` to `true`.
21
22 - The `tag` (sometimes called `op`) in `Diff::getGroupedOpcodes()`'s results are now in `int` form.
23 The corresponding meaning could be found in
24 [jfcherng/php-sequence-matcher](https://github.com/jfcherng/php-sequence-matcher/blob/3.0.0/src/SequenceMatcher.php#L16-L26).