Skip to content

Commit 4750267

Browse files
committed
Move upgrading guide from readme to other files
Signed-off-by: Jack Cherng <[email protected]>
1 parent 12b6024 commit 4750267

File tree

4 files changed

+28
-40
lines changed

4 files changed

+28
-40
lines changed

README.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -319,46 +319,6 @@ $result = $diff->render($renderer);
319319
```
320320
</details>
321321

322-
# Upgrading
323-
324-
325-
<details><summary>From v2 to v3</summary>
326-
327-
- `$diffOptions` removes: `charLevelDiff` and `separateBlock`.
328-
- `$templateOptions` adds: `detailLevel` (similar to `charLevelDiff`, read docs) and `separateBlock` (exact the same one in `$diffOptions`).
329-
- `Jfcherng\Diff\Diff`'s `$a` (`$old`), `$b` (`$new`) are required in `__construct()`. (You may pass two empty arrays if you do not want to do anything at that moment.)
330-
- The look of "skipped" block in HTML renderers (`SideBySide` and `Inline`) have been changed. (You may have to tweak your CSS.)
331-
332-
</details>
333-
334-
<details><summary>From v3 to v4</summary>
335-
336-
- `Jfcherng\Diff\Utility\SequenceMatcher` becomes [a new package](https://packagist.org/packages/jfcherng/php-sequence-matcher) by the namespace of `Jfcherng\Diff\SequenceMatcher`.
337-
- Factories under `Jfcherng\Diff\Utility\` are moved to `Jfcherng\Diff\Factory\`. For example, `Jfcherng\Diff\Utility\RendererFactory` is now `Jfcherng\Diff\Factory\RendererFactory`.
338-
- Non-abstract classes are no longer inheritable as they are added with `final` keywords. (This allows me to do more internal changes without causing possible BC breaks.)
339-
340-
</details>
341-
342-
<details><summary>From v4 to v5</summary>
343-
344-
- Names involving `a, b`, `from, to`, `base, changed` have been renamed to `old, new` for consistency.
345-
Here's some examples:
346-
347-
- `Diff::setAB()` becomes `Diff::setOldNew()`.
348-
- `Diff::setA()` becomes `Diff::setOld()`.
349-
- `Diff::setB()` becomes `Diff::setNew()`.
350-
- `Diff::getA()` becomes `Diff::getOld()`.
351-
- `Diff::getB()` becomes `Diff::getNew()`.
352-
- `base`, `changed` keys in the result of the `Json` renderer have become `old`, `new`.
353-
354-
- In the result of HTML renderers, classes of rows of line numbers has been changed.
355-
You may have to change your CSS if you have some customized things depend on these.
356-
357-
- `<th class="f-num">` (from-number) becomes `<th class="n-new">` (number-new).
358-
- `<th class="t-num">` (to-number) becomes `<th class="n-old">` (number-old).
359-
360-
</details>
361-
362322

363323
# Acknowledgment
364324

UPGRADING_v3.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Upgrading to v3
2+
3+
- `$diffOptions` removes: `charLevelDiff` and `separateBlock`.
4+
- `$templateOptions` adds: `detailLevel` (similar to `charLevelDiff`, read docs) and `separateBlock` (exact the same one in `$diffOptions`).
5+
- `Jfcherng\Diff\Diff`'s `$a` (`$old`), `$b` (`$new`) are required in `__construct()`. (You may pass two empty arrays if you do not want to do anything at that moment.)
6+
- The look of "skipped" block in HTML renderers (`SideBySide` and `Inline`) have been changed. (You may have to tweak your CSS.)

UPGRADING_v4.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Upgrading to v4
2+
3+
- `Jfcherng\Diff\Utility\SequenceMatcher` becomes [a new package](https://packagist.org/packages/jfcherng/php-sequence-matcher) by the namespace of `Jfcherng\Diff\SequenceMatcher`.
4+
- Factories under `Jfcherng\Diff\Utility\` are moved to `Jfcherng\Diff\Factory\`. For example, `Jfcherng\Diff\Utility\RendererFactory` is now `Jfcherng\Diff\Factory\RendererFactory`.
5+
- Non-abstract classes are no longer inheritable as they are added with `final` keywords. (This allows me to do more internal changes without causing possible BC breaks.)

UPGRADING_v5.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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).

0 commit comments

Comments
 (0)