Skip to content

Commit 2d05831

Browse files
committed
Merge branch 'master' into php-diff-82
2 parents 80269e4 + 9830fe0 commit 2d05831

File tree

3 files changed

+171
-91
lines changed

3 files changed

+171
-91
lines changed

changelog.md

Lines changed: 136 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,188 @@
1-
# changelog
1+
# Changelog
22

3-
## next
3+
## 2.3.1 (2021-02-03)
44

5-
* Refactored HTML Inline renderer to HTML Unified.
5+
* Add DigiLive/gitChangelog for change log generation ([0a6a84f](https://github.com/JBlond/php-diff/commit/0a6a84f))
6+
* Bump library version ([013f862](https://github.com/JBlond/php-diff/commit/013f862))
7+
* Cut HTML Unified Renderer ([1ba255f](https://github.com/JBlond/php-diff/commit/1ba255f))
8+
* Document PhpUnit Similarity Test ([7ec484c](https://github.com/JBlond/php-diff/commit/7ec484c))
9+
* Document Update Changelog ([7d6c8bb](https://github.com/JBlond/php-diff/commit/7d6c8bb), [c9881d3](https://github.com/JBlond/php-diff/commit/c9881d3))
10+
* Document disabled inspection ([909e195](https://github.com/JBlond/php-diff/commit/909e195))
11+
* Document generateLinesEqual() ([8a193c9](https://github.com/JBlond/php-diff/commit/8a193c9))
12+
* Document methods ([94c8bd5](https://github.com/JBlond/php-diff/commit/94c8bd5))
13+
* Fix [#83](https://github.com/JBlond/php-diff/issues/83) - Lines not properly marked ([6fcafe1](https://github.com/JBlond/php-diff/commit/6fcafe1))
14+
* Fix HTML Merged Renderer ([07da484](https://github.com/JBlond/php-diff/commit/07da484))
15+
* Fix constructor DocBlocks ([b13ff84](https://github.com/JBlond/php-diff/commit/b13ff84))
16+
* Fix html syntax error ([11ec623](https://github.com/JBlond/php-diff/commit/11ec623))
17+
* Fix namespace and unused code ([77a7b59](https://github.com/JBlond/php-diff/commit/77a7b59))
18+
* Fix probably undefined variable ([3954a2b](https://github.com/JBlond/php-diff/commit/3954a2b))
19+
* Fix property visibility and method docBlocks ([3bc0839](https://github.com/JBlond/php-diff/commit/3bc0839))
20+
* Fix property visibility and unused code ([34a032f](https://github.com/JBlond/php-diff/commit/34a032f))
21+
* Fix redundant and unused code. ([73f6776](https://github.com/JBlond/php-diff/commit/73f6776))
22+
* add phpunit config file ([7382ee8](https://github.com/JBlond/php-diff/commit/7382ee8))
623

7-
* The non table unified renderer is cut from the code.
24+
## v2.3.0 (2020-11-19)
825

9-
## 2.3.0 (2020-11-19)
26+
* Add Html Merged renderer. ([d70eaf6](https://github.com/JBlond/php-diff/commit/d70eaf6))
27+
* Add PhpUnit test for html merged renderer ([4512c03](https://github.com/JBlond/php-diff/commit/4512c03))
28+
* Add calculation for similarity ratio. ([3e4bbe6](https://github.com/JBlond/php-diff/commit/3e4bbe6))
29+
* Add choosing marking levels to html example ([c27035a](https://github.com/JBlond/php-diff/commit/c27035a))
30+
* Add new marking levels for inline differences ([75358da](https://github.com/JBlond/php-diff/commit/75358da))
31+
* Document properties and constructor ([6c95ccd](https://github.com/JBlond/php-diff/commit/6c95ccd))
32+
* Fix: Html SideBySide renders equal lines of version 1 at both sides. ([ccfc465](https://github.com/JBlond/php-diff/commit/ccfc465))
33+
* Fix Merged::generateLinesReplace() ([cef85b5](https://github.com/JBlond/php-diff/commit/cef85b5))
34+
* Fix PSR-4 Auto loading Typo ([6e2ad47](https://github.com/JBlond/php-diff/commit/6e2ad47))
35+
* Fix PhpUnit test ([3ccaa10](https://github.com/JBlond/php-diff/commit/3ccaa10))
36+
* Fix Undefined offset notice ([b10fd38](https://github.com/JBlond/php-diff/commit/b10fd38))
37+
* Fixes [#64](https://github.com/JBlond/php-diff/issues/64) - maxLineMarkerWidth only calculated for input format plain. ([c5f6d72](https://github.com/JBlond/php-diff/commit/c5f6d72))
38+
* Fix generateBlockHeader docBlocks ([b5cfbd5](https://github.com/JBlond/php-diff/commit/b5cfbd5))
39+
* Fix visibility of removed lines ([ec0918b](https://github.com/JBlond/php-diff/commit/ec0918b))
40+
* add changelog ([4b7a56f](https://github.com/JBlond/php-diff/commit/4b7a56f))
41+
* add changelog to Readme file ([09aea70](https://github.com/JBlond/php-diff/commit/09aea70))
42+
* add date ([c64c0cc](https://github.com/JBlond/php-diff/commit/c64c0cc))
43+
* add declaration ([cff7db1](https://github.com/JBlond/php-diff/commit/cff7db1))
44+
* add wiki links to README.md ([ccd5a6d](https://github.com/JBlond/php-diff/commit/ccd5a6d))
1045

11-
* Add: Change log.
12-
13-
* Fix: Html SideBySide renders equal lines of version 1 at both sides (Option
14-
ignoreCase).
46+
## v2.2.1 (2020-08-06)
1547

16-
* Fix: Second parameter of string repeat function minimizes to 0.
48+
* Fix [#58](https://github.com/JBlond/php-diff/issues/58) - Side by side diff shows empty diff ([0946d59](https://github.com/JBlond/php-diff/commit/0946d59), [369b146](https://github.com/JBlond/php-diff/commit/369b146), [02695d5](https://github.com/JBlond/php-diff/commit/02695d5))
49+
* add to dev for unit tests ([acd12cb](https://github.com/JBlond/php-diff/commit/acd12cb))
1750

18-
* Fix: #60 - Unified Cli renderer options incompatible with Main renderer
19-
options
51+
## v2.2.0 (2020-07-23)
2052

21-
* Fix: #64 - Calculation of maxLineMarkerWidth independent of input format.
53+
* Fix code quality. ([0ef6def](https://github.com/JBlond/php-diff/commit/0ef6def))
54+
* add line for readabiltity ([e28511b](https://github.com/JBlond/php-diff/commit/e28511b))
2255

23-
* Add: Similarity calculation
56+
## v2.1.1 (2020-07-17)
2457

25-
* Add: New marking levels for inline differences
58+
* Fix [#50](https://github.com/JBlond/php-diff/issues/50). ([47d6288](https://github.com/JBlond/php-diff/commit/47d6288))
59+
* add unit test for cli output ([0c75757](https://github.com/JBlond/php-diff/commit/0c75757))
2660

27-
* Add: Html merged renderer
61+
## v2.1.0 (2020-07-13)
2862

29-
## 2.2.1 (2020-08-06)
63+
* add plain output for cli ([d7bbe12](https://github.com/JBlond/php-diff/commit/d7bbe12))
3064

31-
* Fix: #58 - Side by side diff shows empty diff
65+
## v2.0.0 (2020-07-09)
3266

33-
## 2.2.0 (2020-07-23)
67+
* Add Cli color support ([4192d8b](https://github.com/JBlond/php-diff/commit/4192d8b))
68+
* Add dark theme example ([6f41894](https://github.com/JBlond/php-diff/commit/6f41894))
69+
* Add example picture ([ee37a28](https://github.com/JBlond/php-diff/commit/ee37a28))
70+
* add composer scripts descriptions. Update key words ([6bfd4f9](https://github.com/JBlond/php-diff/commit/6bfd4f9))
71+
* add missing tag from merge ([639f3cc](https://github.com/JBlond/php-diff/commit/639f3cc))
3472

35-
* Add: Option for a custom override renderer. #53
73+
## v1.18 (2020-07-01)
3674

37-
* Add: No output when there are no differences between the compared strings /
38-
files. #52 #54
75+
* add author ([e132cdb](https://github.com/JBlond/php-diff/commit/e132cdb))
76+
* add dark theme example ([b9d0ef6](https://github.com/JBlond/php-diff/commit/b9d0ef6))
3977

40-
## 2.1.1 (2020-07-17)
78+
## v1.17 (2020-06-08)
4179

42-
* Fix: #50 - Renderers produce output with equal texts, while they shouldn't.
80+
* Fix issue [#32](https://github.com/JBlond/php-diff/issues/32). ([7ef67e6](https://github.com/JBlond/php-diff/commit/7ef67e6))
81+
* fix typo in phpdoc ([db259fc](https://github.com/JBlond/php-diff/commit/db259fc))
4382

44-
## 2.1.0 (2020-07-13)
83+
## v1.16 (2020-03-02)
4584

46-
* Add: Cli uncolored output. This allows it to be piped.
85+
* Add composer package PHP Mess Detector v2.* ([3e527d1](https://github.com/JBlond/php-diff/commit/3e527d1))
86+
* Add contributor to author lists. ([4c2cbb7](https://github.com/JBlond/php-diff/commit/4c2cbb7), [c11b4ba](https://github.com/JBlond/php-diff/commit/c11b4ba))
87+
* Add trimEqual option. ([98d993e](https://github.com/JBlond/php-diff/commit/98d993e))
88+
* Add types of elements for renderer ([4d1b4a0](https://github.com/JBlond/php-diff/commit/4d1b4a0), [83b4104](https://github.com/JBlond/php-diff/commit/83b4104))
89+
* Fix PHPMD Violation. ([5d03eae](https://github.com/JBlond/php-diff/commit/5d03eae))
90+
* Fix expected value for HtmlRendererTest::testUnified() ([fbda2bd](https://github.com/JBlond/php-diff/commit/fbda2bd))
4791

48-
## 2.0.0 (2020-07-09)
92+
## v1.15 (2020-01-24)
4993

50-
* Add: Unified Commandline colored output.
51-
* Change: switch to semantic versioning.
94+
* fix notation ([795fe20](https://github.com/JBlond/php-diff/commit/795fe20))
5295

53-
## 1.18 (2020-07-01)
96+
## v1.14 (2019-12-03)
5497

55-
* Add: A dark theme to the example.
56-
* Fix: Avoid variables with short names (some).
98+
* No changes.
5799

58-
## 1.17 (2020-06-08)
100+
## v1.13 (2019-10-08)
59101

60-
* Fix #32 - Side by side diff shows only partially all deleted lines.
102+
* No changes.
61103

62-
## 1.16 (2020-03-02)
104+
## v1.12 (2019-03-18)
63105

64-
* Features
65-
* Add: option trimEqual.
106+
* add more files to .gitignore ([27b21eb](https://github.com/JBlond/php-diff/commit/27b21eb))
107+
* add phpunit test to composer ([e8a3f71](https://github.com/JBlond/php-diff/commit/e8a3f71))
108+
* add tests ([6d165a6](https://github.com/JBlond/php-diff/commit/6d165a6))
66109

67-
* Fixes
68-
* Fix PHPMD Violation.
69-
* Code Optimization, cleanup, refactoring and commenting.
110+
## v1.11 (2019-02-22)
70111

71-
## 1.15 (2020-01-24)
112+
* No changes.
72113

73-
* Add: New Unified HTML.
74-
* Fix: Code clean up.
114+
## v1.10 (2019-02-20)
75115

76-
## 1.14 (2019-12-03)
116+
* fix codacy warnings of unused functions ([8037d99](https://github.com/JBlond/php-diff/commit/8037d99))
117+
* fix example ([9207f73](https://github.com/JBlond/php-diff/commit/9207f73))
77118

78-
* Fix: Remove some old dead code.
119+
## v1.9 (2019-02-19)
79120

80-
## 1.13 (2019-10-08)
121+
* add comment like in the other file ([8b68a5d](https://github.com/JBlond/php-diff/commit/8b68a5d))
122+
* add stronger type hinting ([3a6ef42](https://github.com/JBlond/php-diff/commit/3a6ef42))
81123

82-
* Change: Switch to PSR12.
124+
## v1.8 (2019-02-13)
83125

84-
## 1.12 (2019-03-18)
126+
* fix test ([b4cfce1](https://github.com/JBlond/php-diff/commit/b4cfce1))
85127

86-
* Change: Update Composer Configuration.
87-
* Fix: PSR-2 conventions.
128+
## v1.7 (2019-01-19)
88129

89-
## 1.11 (2019-02-22)
130+
* add code sniffer PSR2 file ([6fa3c76](https://github.com/JBlond/php-diff/commit/6fa3c76))
131+
* adding curly brackets ([148e787](https://github.com/JBlond/php-diff/commit/148e787))
132+
* fix PSR1.Files.SideEffects.FoundWithSymbols ([fe21917](https://github.com/JBlond/php-diff/commit/fe21917))
133+
* fix tabs ([354bf5c](https://github.com/JBlond/php-diff/commit/354bf5c))
90134

91-
* Fix: Code clean up.
92-
* Fix: Composer autoloader for unit tests.
135+
## v1.6 (2019-01-19)
93136

94-
## 1.10 (2019-02-20)
137+
* Fix warning with PHP 7.2 when trying to count NULL ([fe69c4f](https://github.com/JBlond/php-diff/commit/fe69c4f))
138+
* add ci file ([add8165](https://github.com/JBlond/php-diff/commit/add8165))
139+
* add dock block ([2aafad1](https://github.com/JBlond/php-diff/commit/2aafad1))
140+
* add unit tests ([0db511d](https://github.com/JBlond/php-diff/commit/0db511d))
141+
* fix tests ([44a6ab0](https://github.com/JBlond/php-diff/commit/44a6ab0))
95142

96-
* Fix: Code clean up.
143+
## v1.5 (2019-01-15)
97144

98-
## 1.9 (2019-02-19)
145+
* No changes.
99146

100-
* Fix: Code clean up.
147+
## v1.4 (2019-01-14)
101148

102-
## 1.8
149+
* Add PSR4 autoloader ([bda1da9](https://github.com/JBlond/php-diff/commit/bda1da9))
150+
* add badge ([0fac082](https://github.com/JBlond/php-diff/commit/0fac082))
151+
* add keywords ([e64716d](https://github.com/JBlond/php-diff/commit/e64716d))
152+
* add name spacing ([1d15164](https://github.com/JBlond/php-diff/commit/1d15164))
103153

104-
* Change: Update Readme and bumping versions.
154+
## v1.3 (2019-01-11)
105155

106-
* Fix: Moved include of Autoloader from the constructor to global space for
107-
HtmlArray unit test.
156+
* Fixed lengths of functions ([3591789](https://github.com/JBlond/php-diff/commit/3591789))
157+
* Fix some typos ([5ca2257](https://github.com/JBlond/php-diff/commit/5ca2257))
158+
* added missing doc block ([c6f3745](https://github.com/JBlond/php-diff/commit/c6f3745))
159+
* add lang to html ([1623626](https://github.com/JBlond/php-diff/commit/1623626))
160+
* add second image ([176b647](https://github.com/JBlond/php-diff/commit/176b647))
108161

109-
## 1.7
162+
## v1.2 (2018-01-23)
110163

111-
* Fix: PSR-2 code alignment.
164+
* added example code from https://github.com/JBlond/php-diff/issues/1 ([258b976](https://github.com/JBlond/php-diff/commit/258b976))
165+
* add image to README.md ([0432f78](https://github.com/JBlond/php-diff/commit/0432f78))
112166

113-
## 1.6
167+
## v1.1 (2017-05-05)
114168

115-
* Change: Bump required version of PHP to v7.1.
116-
* Add: Return type hinting.
169+
* Add ability not to expand tabs ([f5da126](https://github.com/JBlond/php-diff/commit/f5da126))
170+
* Added note about https://github.com/Xiphe/jQuery-Merge-for-php-diff ([2ebc51f](https://github.com/JBlond/php-diff/commit/2ebc51f))
171+
* Add in working ignoreWhitespace and ignoreCase options (self-describing), fix up an issue where a diff of two files exactly the same would show the last $context lines, general cleanup ([690419d](https://github.com/JBlond/php-diff/commit/690419d))
172+
* Add mbstring extension as package dependency ([a929467](https://github.com/JBlond/php-diff/commit/a929467))
173+
* Add missing docblock. Rename isLineDifferent to linesAreDifferent ([516c4be](https://github.com/JBlond/php-diff/commit/516c4be))
174+
* Fix ' ([c81931f](https://github.com/JBlond/php-diff/commit/c81931f))
175+
* Fix an issue with insertions being skipped. ([b13d23d](https://github.com/JBlond/php-diff/commit/b13d23d))
176+
* Fix links ([2c38d0e](https://github.com/JBlond/php-diff/commit/2c38d0e))
177+
* Fix tab expansion and deprecated preg_replace use on fixSpaces. ([f0aba03](https://github.com/JBlond/php-diff/commit/f0aba03))
178+
* Fix the ignoring of option context ([60de296](https://github.com/JBlond/php-diff/commit/60de296))
179+
* add composer file ([be8dc58](https://github.com/JBlond/php-diff/commit/be8dc58))
180+
* added ' ([09d0c4c](https://github.com/JBlond/php-diff/commit/09d0c4c))
181+
* added License ([3b5b338](https://github.com/JBlond/php-diff/commit/3b5b338))
182+
* added widget ([d1a5e18](https://github.com/JBlond/php-diff/commit/d1a5e18))
183+
* adding composer manifest to distribute as a library ([9083bd6](https://github.com/JBlond/php-diff/commit/9083bd6))
184+
* add missing doc blocks ([d3b9a63](https://github.com/JBlond/php-diff/commit/d3b9a63))
117185

118-
## 1.5 (2019-01-15)
186+
## v1.0 (2010-03-11)
119187

120-
* Fix: Autoloader naming issues.
121-
122-
## 1.4 (2019-01-14)
123-
124-
* Add: PSR-4 namespace support.
125-
126-
## 1.3 (2019-01-11)
127-
128-
* Fix: PHP methods contained too much logic. That has been simplified.
129-
130-
## 1.2 (2018-01-23)
131-
132-
* Add: Support for custom titles.
133-
134-
## 1.1 (2017-05-06)
135-
136-
* Fix: Wrong highlight area for chinese characters.
137-
138-
## 1.0
139-
140-
* Initial version.
188+
* No changes.

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"phpunit/phpunit": "^8 || ^9",
3636
"squizlabs/php_codesniffer": "*",
3737
"phpmd/phpmd": "2.*",
38-
"jblond/php-cli": "^1.0"
38+
"jblond/php-cli": "^1.0",
39+
"digilive/git-changelog": "^1"
3940
},
4041
"suggest": {
4142
"jblond/php-cli": "^1.0"
@@ -53,12 +54,14 @@
5354
"phpunit": "phpunit",
5455
"php_src": "phpcs --standard=phpcs.xml -s -p --colors ./lib/",
5556
"php_test": "phpcs --standard=phpcs.xml -s -p --colors ./tests/",
56-
"phpmd": "phpmd ./ ansi cleancode,codesize,controversial,design,naming,unusedcode --exclude vendor"
57+
"phpmd": "phpmd ./ ansi cleancode,codesize,controversial,design,naming,unusedcode --exclude vendor",
58+
"changelog": "php generateChangelog.php"
5759
},
5860
"scripts-descriptions": {
5961
"phpunit": "Run PHPUnit tests",
6062
"php_src": "Run code sniffer on lib directory",
6163
"php_test": "Run code sniffer on tests directory",
62-
"phpmd": "Run php mess detector"
64+
"phpmd": "Run php mess detector",
65+
"changelog": "generate changelog from commits"
6366
}
6467
}

generateChangelog.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
use DigiLive\GitChangelog\Renderers\MarkDown;
4+
5+
require 'vendor/autoload.php';
6+
7+
$changelogOptions = [
8+
'headTagName' => '2.3.1',
9+
'headTagDate' => '2021-02-03',
10+
'titleOrder' => 'ASC',
11+
];
12+
$changelogLabels = ['Add', 'Cut', 'Fix', 'Bump', 'Document','Optimize'];
13+
14+
15+
$changeLog = new MarkDown();
16+
$changeLog->commitUrl = 'https://github.com/JBlond/php-diff/commit/{hash}';
17+
$changeLog->issueUrl = 'https://github.com/JBlond/php-diff/issues/{issue}';
18+
try {
19+
$changeLog->setOptions($changelogOptions);
20+
} catch (Exception $exception) {
21+
echo $exception->getMessage();
22+
}
23+
$changeLog->setLabels(...$changelogLabels);
24+
try {
25+
$changeLog->build();
26+
} catch (Exception $exception) {
27+
echo $exception->getMessage();
28+
}
29+
$changeLog->save('changelog.md');

0 commit comments

Comments
 (0)