Skip to content

Commit 02df1b4

Browse files
authored
Bump nategood/httpful to ^1.0 (#2)
* Bump nategood/httpful to ^1.0 * Fix phpstan
1 parent cc84146 commit 02df1b4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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
},

Diff for: src/GitResolver.php

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Rector\ReleaseNotesGenerator\ValueObject\Commit;
88
use Symfony\Component\Process\Process;
9+
use Webmozart\Assert\Assert;
910

1011
final 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
}

0 commit comments

Comments
 (0)