Skip to content

Commit a6e3295

Browse files
Upgrade Dependencies and Drop Support for PHP 8.3 and PHP 8.2 (#80)
1 parent 1c85108 commit a6e3295

17 files changed

+1501
-1261
lines changed

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ jobs:
77
update_release_draft:
88
uses: stefanzweifel/reusable-workflows/.github/workflows/phpstan.yml@main
99
with:
10-
php_version: '8.3'
10+
php_version: '8.4'

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: [8.2, 8.3, 8.4]
12+
php: [8.4]
1313

1414
name: P${{ matrix.php }} - ${{ matrix.os }}
1515

app/Actions/PlaceReleaseNotesBelowUnreleasedHeadingAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function execute(Heading $unreleasedHeading, string $latestVersion, strin
3535

3636
$link = $this->getLinkNodeFromHeading($unreleasedHeading);
3737
$link->setUrl($updatedUrl);
38+
3839
$this->gitHubActionsOutput->add('UNRELEASED_COMPARE_URL', $updatedUrl);
3940

4041
// Create new Heading containing the new version number

app/CreateNewReleaseHeading.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function create(string $text, string $releaseDate, bool $hideDate = false
1818
$heading->appendChild(new Text($text));
1919

2020
if ($hideDate === false) {
21-
$heading->appendChild(new Text(" - {$releaseDate}"));
21+
$heading->appendChild(new Text(' - '.$releaseDate));
2222
}
2323

2424
$this->extractPermalinkFragmentFromHeading->execute($heading);

app/CreateNewReleaseHeadingWithCompareUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ protected function createLinkNode(string $text, string $url): Link
4545

4646
protected function createDateNode(string $releaseDate): Text
4747
{
48-
return new Text(" - {$releaseDate}");
48+
return new Text(' - '.$releaseDate);
4949
}
5050
}

app/Exceptions/ReleaseAlreadyExistsInChangelogException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ class ReleaseAlreadyExistsInChangelogException extends Exception
1010
{
1111
public function __construct(public string $release)
1212
{
13-
parent::__construct("CHANGELOG was not updated as release notes for {$release} already exist.");
13+
parent::__construct(sprintf('CHANGELOG was not updated as release notes for %s already exist.', $release));
1414
}
1515
}

app/GenerateCompareUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public function generate(string $url, string $from, string $to): string
1212
{
1313
$url = Str::finish($url, '/');
1414

15-
return "{$url}compare/{$from}...{$to}";
15+
return sprintf('%scompare/%s...%s', $url, $from, $to);
1616
}
1717
}

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,16 @@ class AppServiceProvider extends ServiceProvider
1111
{
1212
/**
1313
* Bootstrap any application services.
14-
*
15-
* @return void
1614
*/
17-
public function boot()
15+
public function boot(): void
1816
{
1917
$this->app->singleton(GitHubActionsOutput::class, fn () => new GitHubActionsOutput);
2018
}
2119

2220
/**
2321
* Register any application services.
24-
*
25-
* @return void
2622
*/
27-
public function register()
23+
public function register(): void
2824
{
2925
//
3026
}

app/Support/GitHubActionsOutput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private function setOutput(string $name, string $value): void
2525
$pathToGitHubOutput = getenv('GITHUB_OUTPUT');
2626
$gitHubOutput = file_get_contents($pathToGitHubOutput);
2727

28-
$gitHubOutput .= "$name=$value\n";
28+
$gitHubOutput .= sprintf('%s=%s%s', $name, $value, PHP_EOL);
2929

3030
file_put_contents($pathToGitHubOutput, $gitHubOutput, FILE_APPEND | LOCK_EX);
3131
}

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^8.2",
17+
"php": "^8.4",
1818
"ext-dom": "*",
1919
"league/commonmark": "^2.3.5",
2020
"webmozart/assert": "^1.11",
2121
"wnx/commonmark-markdown-renderer": "^1.0.2"
2222
},
2323
"require-dev": {
24-
"larastan/larastan": "^2.0",
25-
"laravel-zero/framework": "^11",
24+
"larastan/larastan": "^3.7",
25+
"laravel-zero/framework": "^12",
2626
"laravel/pint": "^1.10",
2727
"mockery/mockery": "^1.5.1",
28-
"pestphp/pest": "^3",
29-
"rector/rector": "^1.0"
28+
"pestphp/pest": "^4",
29+
"rector/rector": "^2.0"
3030
},
3131
"autoload": {
3232
"psr-4": {

0 commit comments

Comments
 (0)