File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 99 "require" : {
1010 "php" : " ^8.2" ,
1111 "symfony/console" : " ^6.4|^7.0" ,
12- "nategood/httpful" : " ^0.3.2 " ,
12+ "nategood/httpful" : " ^1.0 " ,
1313 "webmozart/assert" : " ^1.11" ,
1414 "symfony/process" : " ^6.4|^7.0"
1515 },
Original file line number Diff line number Diff line change 66
77use Rector \ReleaseNotesGenerator \ValueObject \Commit ;
88use Symfony \Component \Process \Process ;
9+ use Webmozart \Assert \Assert ;
910
1011final class GitResolver
1112{
@@ -34,6 +35,11 @@ private function mapCommitLinesToCommits(array $commitLines): array
3435 {
3536 return array_map (static function (string $ line ): Commit {
3637 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+
3743 return new Commit ($ matches ['hash ' ], $ matches ['message ' ], $ matches ['date ' ]);
3844 }, $ commitLines );
3945 }
You can’t perform that action at this time.
0 commit comments