Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency azjezz/psl to v3 #259

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM composer:2 AS composer

FROM php:8.2-alpine
FROM php:8.3-alpine

COPY --from=composer /usr/bin/composer /usr/bin/composer

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Application that eases release management in the Laminas organisation through GitHub actions",
"license": "BSD-3-Clause",
"require": {
"php": "~8.2.0",
"azjezz/psl": "^2.9.1",
"php": "~8.3.0",
"azjezz/psl": "^3.0.0",
"jwage/changelog-generator": "^1.4.0",
"laminas/laminas-diactoros": "^2.26.0",
"lcobucci/clock": "^3.2.0",
Expand Down
37 changes: 19 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Changelog/BumpAndCommitChangelogVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

interface BumpAndCommitChangelogVersion
{
public const BUMP_MINOR = 'bumpMinorVersion';
public const BUMP_PATCH = 'bumpPatchVersion';
public const string BUMP_MINOR = 'bumpMinorVersion';
public const string BUMP_PATCH = 'bumpPatchVersion';

/**
* @psalm-param self::BUMP_* $bumpType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

class BumpAndCommitChangelogVersionViaKeepAChangelog implements BumpAndCommitChangelogVersion
{
private const CHANGELOG_FILE = 'CHANGELOG.md';
private const string CHANGELOG_FILE = 'CHANGELOG.md';

private const COMMIT_TEMPLATE = <<< 'COMMIT'
private const string COMMIT_TEMPLATE = <<< 'COMMIT'
Bumps changelog version to %s

Updates the %s file to add a changelog entry for a new %s version.
Expand Down
2 changes: 1 addition & 1 deletion src/Changelog/ChangelogReleaseNotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/** @psalm-immutable */
class ChangelogReleaseNotes
{
private const CONCATENATION_STRING = "\n\n-----\n\n";
private const string CONCATENATION_STRING = "\n\n-----\n\n";

/** @psalm-param non-empty-string $changelogFile */
public static function writeChangelogFile(string $changelogFile, self $releaseNotes): void
Expand Down
2 changes: 1 addition & 1 deletion src/Environment/EnvironmentVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/** @psalm-immutable */
class EnvironmentVariables implements Variables
{
private const LOG_LEVELS = [
private const array LOG_LEVELS = [
'100',
'200',
'250',
Expand Down
1 change: 0 additions & 1 deletion src/Git/Value/BranchName.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ private function __construct(

/**
* @pure
* @psalm-suppress ImpureFunctionCall the {@see \Psl\Type\non_empty_string()} API is pure by design
* @psalm-suppress ImpureMethodCall the {@see \Psl\Type\TypeInterface::assert()} API is conditionally pure
*/
public static function fromName(string $name): self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ private function __construct(
* @psalm-pure
*
* @psalm-suppress ImpureMethodCall {@see https://github.com/azjezz/psl/issues/130}
* @psalm-suppress ImpureFunctionCall {@see https://github.com/azjezz/psl/issues/130}
*/
public static function fromPayload(array $payload): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/Github/CreateReleaseTextViaKeepAChangelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class CreateReleaseTextViaKeepAChangelog implements CreateReleaseText
{
/** @psalm-var non-empty-list<string> */
private const DEFAULT_SECTIONS = [
private const array DEFAULT_SECTIONS = [
'Added',
'Changed',
'Deprecated',
Expand Down
1 change: 0 additions & 1 deletion src/Github/Value/RepositoryName.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ private function __construct(

/**
* @psalm-pure
* @psalm-suppress ImpureFunctionCall the {@see \Psl\Type\non_empty_string()} API is pure by design
* @psalm-suppress ImpureMethodCall the {@see \Psl\Type\TypeInterface::assert()} API is conditionally pure
*/
public static function fromFullName(string $fullName): self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private function createMockChangelog(): string
return $changelogFile;
}

private const CHANGELOG_STUB = <<< 'CHANGELOG'
private const string CHANGELOG_STUB = <<< 'CHANGELOG'
# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.
Expand Down
4 changes: 2 additions & 2 deletions test/unit/Changelog/ChangelogReleaseNotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function testMergedInstanceContainsChangelogEntryFromTheInstanceThatHadOn
$this->assertEquals($expectedEntry, $reflectionProperty->getValue($merged));
}

private const CHANGELOG_ENTRY = <<< 'ENTRY'
private const string CHANGELOG_ENTRY = <<< 'ENTRY'
## 1.0.1 - %s

### Added
Expand All @@ -186,7 +186,7 @@ public function testMergedInstanceContainsChangelogEntryFromTheInstanceThatHadOn

ENTRY;

private const CHANGELOG_STUB = <<< 'CHANGELOG'
private const string CHANGELOG_STUB = <<< 'CHANGELOG'
# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.
Expand Down
4 changes: 2 additions & 2 deletions test/unit/Changelog/ReleaseChangelogViaKeepAChangelogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
return $repo;
}

private const INVALID_CHANGELOG = <<< 'END'
private const string INVALID_CHANGELOG = <<< 'END'
# NOT A CHANGELOG

This file is not a changelog.
Expand All @@ -282,7 +282,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string

END;

private const READY_CHANGELOG = <<< 'END'
private const string READY_CHANGELOG = <<< 'END'
# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.
Expand Down
6 changes: 3 additions & 3 deletions test/unit/Github/CreateReleaseTextViaKeepAChangelogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string
return $repo;
}

private const INVALID_CHANGELOG = <<< 'END'
private const string INVALID_CHANGELOG = <<< 'END'
# NOT A CHANGELOG

This file is not a changelog.
Expand All @@ -220,7 +220,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string

END;

private const READY_CHANGELOG = <<< 'END'
private const string READY_CHANGELOG = <<< 'END'
# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.
Expand Down Expand Up @@ -271,7 +271,7 @@ private function checkoutMockRepositoryWithChangelog(string $origin): string

END;

private const CHANGELOG_MULTI_SECTION = <<< 'END'
private const string CHANGELOG_MULTI_SECTION = <<< 'END'
# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.
Expand Down
Loading