File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 9
9
"require" : {
10
10
"php" : " ^8.2" ,
11
11
"symfony/console" : " ^6.4|^7.0" ,
12
- "nategood/httpful" : " ^0.3.2 " ,
12
+ "nategood/httpful" : " ^1.0 " ,
13
13
"webmozart/assert" : " ^1.11" ,
14
14
"symfony/process" : " ^6.4|^7.0"
15
15
},
Original file line number Diff line number Diff line change 6
6
7
7
use Rector \ReleaseNotesGenerator \ValueObject \Commit ;
8
8
use Symfony \Component \Process \Process ;
9
+ use Webmozart \Assert \Assert ;
9
10
10
11
final class GitResolver
11
12
{
@@ -34,6 +35,11 @@ private function mapCommitLinesToCommits(array $commitLines): array
34
35
{
35
36
return array_map (static function (string $ line ): Commit {
36
37
preg_match ('#(?<hash>\w+) (?<message>.*?) (?<date>\d+\-\d+\-\d+)# ' , $ line , $ matches );
38
+
39
+ Assert::keyExists ($ matches , 'hash ' );
40
+ Assert::keyExists ($ matches , 'message ' );
41
+ Assert::keyExists ($ matches , 'date ' );
42
+
37
43
return new Commit ($ matches ['hash ' ], $ matches ['message ' ], $ matches ['date ' ]);
38
44
}, $ commitLines );
39
45
}
You can’t perform that action at this time.
0 commit comments