From 8ba0698077091b3a0492bffcda0c366c2939f221 Mon Sep 17 00:00:00 2001 From: Joshua Estes Date: Thu, 1 Aug 2024 16:01:45 -0400 Subject: [PATCH] Upgrade required php version (#212) ## Description ## Checklist - [ ] Updated CHANGELOG files - [ ] Updated Documentation - [ ] Unit Tests Created - [ ] php-cs-fixer --- .github/workflows/codecov.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- composer.json | 2 +- psalm-baseline.xml | 205 +++++++++++++++--- psalm.xml | 2 +- src/SonsOfPHP/Bard/composer.json | 2 +- .../Bard/src/Console/Command/AddCommand.php | 3 +- .../Bard/src/Console/Command/CopyCommand.php | 3 +- .../Bard/src/Console/Command/InitCommand.php | 3 +- .../src/Console/Command/InstallCommand.php | 8 +- .../Bard/src/Console/Command/MergeCommand.php | 2 +- .../Bard/src/Console/Command/PullCommand.php | 3 +- .../Bard/src/Console/Command/PushCommand.php | 3 +- .../src/Console/Command/ReleaseCommand.php | 2 +- .../Bard/src/Console/Command/SplitCommand.php | 3 +- .../src/Console/Command/UpdateCommand.php | 3 +- .../src/Worker/File/Bard/UpdateVersion.php | 4 +- .../Worker/File/Composer/Package/Authors.php | 4 +- .../File/Composer/Package/BranchAlias.php | 4 +- .../Worker/File/Composer/Package/Funding.php | 4 +- .../Worker/File/Composer/Package/Support.php | 4 +- .../Root/UpdateAutoloadDevSection.php | 4 +- .../Composer/Root/UpdateAutoloadSection.php | 4 +- .../Composer/Root/UpdateProvideSection.php | 4 +- .../Composer/Root/UpdateReplaceSection.php | 4 +- .../Composer/Root/UpdateRequireDevSection.php | 4 +- .../Composer/Root/UpdateRequireSection.php | 4 +- .../Doctrine/Collections/Pager/composer.json | 2 +- .../Bridge/Doctrine/DBAL/Pager/composer.json | 2 +- .../Doctrine/EventSourcing/composer.json | 2 +- .../Bridge/Doctrine/ORM/Pager/composer.json | 2 +- .../Bridge/Symfony/Cqrs/composer.json | 2 +- .../Symfony/EventSourcing/composer.json | 2 +- src/SonsOfPHP/Bridge/Twig/Money/composer.json | 2 +- src/SonsOfPHP/Bundle/Cqrs/composer.json | 2 +- src/SonsOfPHP/Component/Cache/SimpleCache.php | 4 +- src/SonsOfPHP/Component/Cache/composer.json | 2 +- src/SonsOfPHP/Component/Clock/Date.php | 4 +- src/SonsOfPHP/Component/Clock/DateTime.php | 4 +- src/SonsOfPHP/Component/Clock/Time.php | 10 +- src/SonsOfPHP/Component/Clock/Zone.php | 6 +- src/SonsOfPHP/Component/Clock/ZoneOffset.php | 4 +- src/SonsOfPHP/Component/Clock/composer.json | 2 +- .../Component/Container/composer.json | 2 +- src/SonsOfPHP/Component/Cookie/composer.json | 2 +- .../Cqrs/Attribute/AsMessageHandler.php | 4 +- src/SonsOfPHP/Component/Cqrs/composer.json | 2 +- .../Component/EventDispatcher/composer.json | 2 +- .../Aggregate/AggregateVersion.php | 4 +- .../EventTypeMessageEnricherHandler.php | 4 +- .../Message/Enricher/MessageEnricher.php | 4 +- .../Message/Upcaster/MessageUpcaster.php | 4 +- .../Component/EventSourcing/composer.json | 2 +- .../Component/FeatureToggle/Feature.php | 4 +- .../Component/FeatureToggle/composer.json | 2 +- .../Filesystem/Adapter/ChainAdapter.php | 4 +- .../Filesystem/Adapter/NativeAdapter.php | 4 +- .../Filesystem/Adapter/ReadOnlyAdapter.php | 4 +- .../Filesystem/Adapter/WormAdapter.php | 4 +- .../Component/Filesystem/Filesystem.php | 4 +- .../Component/Filesystem/composer.json | 2 +- .../Component/HttpFactory/composer.json | 2 +- .../Component/HttpHandler/composer.json | 2 +- .../Component/HttpMessage/composer.json | 2 +- src/SonsOfPHP/Component/Json/JsonEncoder.php | 24 +- src/SonsOfPHP/Component/Json/composer.json | 2 +- src/SonsOfPHP/Component/Link/composer.json | 2 +- .../Component/Logger/Filter/MockFilter.php | 4 +- src/SonsOfPHP/Component/Logger/composer.json | 2 +- src/SonsOfPHP/Component/Mailer/Mailer.php | 6 +- src/SonsOfPHP/Component/Mailer/composer.json | 2 +- src/SonsOfPHP/Component/Money/composer.json | 2 +- src/SonsOfPHP/Component/Pager/composer.json | 2 +- src/SonsOfPHP/Component/Version/composer.json | 2 +- src/SonsOfPHP/Contract/Common/composer.json | 2 +- src/SonsOfPHP/Contract/Cookie/composer.json | 2 +- src/SonsOfPHP/Contract/Cqrs/composer.json | 2 +- .../Contract/EventSourcing/composer.json | 2 +- .../Contract/FeatureToggle/composer.json | 2 +- .../Contract/Filesystem/composer.json | 2 +- .../Contract/HttpHandler/composer.json | 2 +- src/SonsOfPHP/Contract/Logger/composer.json | 2 +- src/SonsOfPHP/Contract/Mailer/composer.json | 2 +- src/SonsOfPHP/Contract/Money/composer.json | 2 +- src/SonsOfPHP/Contract/Pager/composer.json | 2 +- src/SonsOfPHP/Contract/Version/composer.json | 2 +- 87 files changed, 303 insertions(+), 179 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 864c0678..9cb389aa 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['8.1'] + php-version: ['8.2'] steps: - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index ccc19eb6..7ce7361c 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['8.1'] + php-version: ['8.2'] steps: - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f63623cc..36122dc2 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['8.1', '8.2'] + php-version: ['8.2', '8.3'] steps: - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index b3791522..ceab81f6 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "sonsofphp/mailer-implementation": "0.3.x-dev" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-json": "*", "psr/event-dispatcher": "^1.0", "doctrine/dbal": "^3", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 27c76a87..6cfcb8cb 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -11,38 +11,21 @@ - - - - - - - - - - - - - - - - - @@ -51,9 +34,6 @@ - - - @@ -62,17 +42,11 @@ - - - - - - @@ -81,17 +55,11 @@ - - - - - - @@ -416,6 +384,21 @@ + + + + + + + + + + + + + + + @@ -455,6 +438,21 @@ + + + + + + + + + + + + + + + @@ -621,6 +619,10 @@ + + + + @@ -665,6 +667,11 @@ + + + + + @@ -679,6 +686,9 @@ + + + @@ -688,11 +698,21 @@ + + + + + + + + + + @@ -733,6 +753,7 @@ + @@ -752,6 +773,17 @@ + + + + + + + + + + + @@ -761,6 +793,18 @@ + + + + + + + + + + + + @@ -803,10 +847,20 @@ + + + + + + + + + + @@ -822,6 +876,16 @@ + + + + + + + + + + @@ -832,6 +896,9 @@ + + + @@ -848,6 +915,17 @@ + + + + + + + + + + + @@ -864,6 +942,11 @@ + + + + + @@ -874,6 +957,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -889,11 +997,31 @@ + + + + + + + + + + + + + + + + + + + + @@ -904,6 +1032,11 @@ + + + + + @@ -1370,8 +1503,6 @@ - - @@ -2059,6 +2190,9 @@ + + + @@ -2081,6 +2215,9 @@ + + + diff --git a/psalm.xml b/psalm.xml index 15aa1a13..b17918a4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -8,7 +8,7 @@ cacheDirectory=".psalm-cache" allowStringToStandInForClass="true" errorBaseline="psalm-baseline.xml" - findUnusedBaselineEntry="true" + findUnusedBaselineEntry="false" findUnusedCode="true" autoloader="vendor/autoload.php" > diff --git a/src/SonsOfPHP/Bard/composer.json b/src/SonsOfPHP/Bard/composer.json index c576c1d9..e59ba433 100644 --- a/src/SonsOfPHP/Bard/composer.json +++ b/src/SonsOfPHP/Bard/composer.json @@ -12,7 +12,7 @@ "bin/bard" ], "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/event-dispatcher": "^0.3.x-dev", "sonsofphp/json": "^0.3.x-dev", "sonsofphp/logger": "^0.3.x-dev", diff --git a/src/SonsOfPHP/Bard/src/Console/Command/AddCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/AddCommand.php index 0b60d315..ce2cb352 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/AddCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/AddCommand.php @@ -17,11 +17,10 @@ */ final class AddCommand extends AbstractCommand { - protected static $defaultName = 'add'; - protected function configure(): void { $this + ->setName('add') ->setDescription('Add new repo') ->addOption('branch', null, InputOption::VALUE_REQUIRED, 'What branch we working with?', 'main') ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Dry Run (Do not make any changes)') diff --git a/src/SonsOfPHP/Bard/src/Console/Command/CopyCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/CopyCommand.php index b18ce83b..58ec3249 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/CopyCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/CopyCommand.php @@ -18,11 +18,10 @@ */ final class CopyCommand extends AbstractCommand { - protected static $defaultName = 'copy'; - protected function configure(): void { $this + ->setName('copy') ->setDescription('Copies a file to each package') ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Dry Run (Do not make any changes)') ->addArgument('source', InputArgument::REQUIRED, 'Source file to copy') diff --git a/src/SonsOfPHP/Bard/src/Console/Command/InitCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/InitCommand.php index 0151fef4..1e88c31d 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/InitCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/InitCommand.php @@ -16,11 +16,10 @@ */ final class InitCommand extends AbstractCommand { - protected static $defaultName = 'init'; - protected function configure(): void { $this + ->setName('init') ->setDescription('Creates the initial bard.json file') ; } diff --git a/src/SonsOfPHP/Bard/src/Console/Command/InstallCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/InstallCommand.php index 01c75a1c..a0cd8b18 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/InstallCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/InstallCommand.php @@ -14,16 +14,10 @@ */ final class InstallCommand extends AbstractCommand { - protected static $defaultName = 'install'; - - // public function __construct() - // { - // parent::__construct(); - // } - protected function configure(): void { $this + ->setName('install') ->setDescription('Runs composer install for all packages') ; } diff --git a/src/SonsOfPHP/Bard/src/Console/Command/MergeCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/MergeCommand.php index ee8112c5..b5781e58 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/MergeCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/MergeCommand.php @@ -31,7 +31,6 @@ */ final class MergeCommand extends AbstractCommand { - protected static $defaultName = 'merge'; private readonly Json $json; private array $bardConfig; private string $mainComposerFile; @@ -47,6 +46,7 @@ public function __construct() protected function configure(): void { $this + ->setName('merge') ->setDescription('Merges package composer.json files into main composer.json file') ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Dry Run (Do not make any changes)') ->addArgument('package', InputArgument::OPTIONAL, 'Which package?') diff --git a/src/SonsOfPHP/Bard/src/Console/Command/PullCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/PullCommand.php index 297ab05c..c1fa6c5c 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/PullCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/PullCommand.php @@ -16,11 +16,10 @@ */ final class PullCommand extends AbstractCommand { - protected static $defaultName = 'pull'; - protected function configure(): void { $this + ->setName('pull') ->setDescription('Pull changes from package repos') ->addOption('branch', null, InputOption::VALUE_REQUIRED, 'What branch we working with?', 'main') ; diff --git a/src/SonsOfPHP/Bard/src/Console/Command/PushCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/PushCommand.php index 159e080f..bafb0026 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/PushCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/PushCommand.php @@ -19,11 +19,10 @@ */ final class PushCommand extends AbstractCommand { - protected static $defaultName = 'push'; - protected function configure(): void { $this + ->setName('push') ->setDescription('Push changes to package repos using git subtree push') ->addOption('branch', null, InputOption::VALUE_REQUIRED, 'What branch we working with?', 'main') ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Dry Run (Do not make any changes)') diff --git a/src/SonsOfPHP/Bard/src/Console/Command/ReleaseCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/ReleaseCommand.php index 79106d9a..f6fbf663 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/ReleaseCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/ReleaseCommand.php @@ -25,7 +25,6 @@ */ final class ReleaseCommand extends AbstractCommand { - protected static $defaultName = 'release'; private JsonFile $bardConfig; private VersionInterface|Version|null $releaseVersion = null; private bool $isDryRun = true; @@ -33,6 +32,7 @@ final class ReleaseCommand extends AbstractCommand protected function configure(): void { $this + ->setName('release') ->setDescription('Create a new release') ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Execute a dry-run with nothing being updated or released') ->addOption('branch', null, InputOption::VALUE_REQUIRED, 'What branch we working with?', 'main') diff --git a/src/SonsOfPHP/Bard/src/Console/Command/SplitCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/SplitCommand.php index 94624f8a..3d7ed967 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/SplitCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/SplitCommand.php @@ -17,11 +17,10 @@ */ final class SplitCommand extends AbstractCommand { - protected static $defaultName = 'split'; - protected function configure(): void { $this + ->setName('split') ->setDescription('Push changes to package repos using git subtree split') ->addOption('branch', null, InputOption::VALUE_REQUIRED, 'What branch we working with?', 'main') ->addOption('dry-run', null, InputOption::VALUE_NONE, 'Dry Run (Do not make any changes)') diff --git a/src/SonsOfPHP/Bard/src/Console/Command/UpdateCommand.php b/src/SonsOfPHP/Bard/src/Console/Command/UpdateCommand.php index c943f7fa..45cedc4c 100644 --- a/src/SonsOfPHP/Bard/src/Console/Command/UpdateCommand.php +++ b/src/SonsOfPHP/Bard/src/Console/Command/UpdateCommand.php @@ -14,11 +14,10 @@ */ final class UpdateCommand extends AbstractCommand { - protected static $defaultName = 'update'; - protected function configure(): void { $this + ->setName('update') ->setDescription('Runs composer update for all packages') ; } diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Bard/UpdateVersion.php b/src/SonsOfPHP/Bard/src/Worker/File/Bard/UpdateVersion.php index 630064f4..1029353c 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Bard/UpdateVersion.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Bard/UpdateVersion.php @@ -11,9 +11,9 @@ /** * @author Joshua Estes */ -final class UpdateVersion implements WorkerInterface +final readonly class UpdateVersion implements WorkerInterface { - public function __construct(private readonly VersionInterface $version) {} + public function __construct(private VersionInterface $version) {} public function apply(JsonFile $bardJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Authors.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Authors.php index 6335f223..abb9cd9a 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Authors.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Authors.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class Authors implements WorkerInterface +final readonly class Authors implements WorkerInterface { - public function __construct(private readonly JsonFile $rootComposerJsonFile) {} + public function __construct(private JsonFile $rootComposerJsonFile) {} public function apply(JsonFile $pkgComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/BranchAlias.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/BranchAlias.php index 862188c0..0f16e6f3 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/BranchAlias.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/BranchAlias.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class BranchAlias implements WorkerInterface +final readonly class BranchAlias implements WorkerInterface { - public function __construct(private readonly JsonFile $rootComposerJsonFile) {} + public function __construct(private JsonFile $rootComposerJsonFile) {} public function apply(JsonFile $pkgComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Funding.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Funding.php index 26e4eb66..69f8d8ee 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Funding.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Funding.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class Funding implements WorkerInterface +final readonly class Funding implements WorkerInterface { - public function __construct(private readonly JsonFile $rootComposerJsonFile) {} + public function __construct(private JsonFile $rootComposerJsonFile) {} public function apply(JsonFile $pkgComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Support.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Support.php index f5e1887d..1c20196a 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Support.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Package/Support.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class Support implements WorkerInterface +final readonly class Support implements WorkerInterface { - public function __construct(private readonly JsonFile $rootComposerJsonFile) {} + public function __construct(private JsonFile $rootComposerJsonFile) {} public function apply(JsonFile $pkgComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadDevSection.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadDevSection.php index 6fb6cecf..d405186d 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadDevSection.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadDevSection.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class UpdateAutoloadDevSection implements WorkerInterface +final readonly class UpdateAutoloadDevSection implements WorkerInterface { - public function __construct(private readonly JsonFile $pkgComposerJsonFile) {} + public function __construct(private JsonFile $pkgComposerJsonFile) {} public function apply(JsonFile $rootComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadSection.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadSection.php index b8b312b9..fc919662 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadSection.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateAutoloadSection.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class UpdateAutoloadSection implements WorkerInterface +final readonly class UpdateAutoloadSection implements WorkerInterface { - public function __construct(private readonly JsonFile $pkgComposerJsonFile) {} + public function __construct(private JsonFile $pkgComposerJsonFile) {} public function apply(JsonFile $rootComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateProvideSection.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateProvideSection.php index 30b48826..7169454b 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateProvideSection.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateProvideSection.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class UpdateProvideSection implements WorkerInterface +final readonly class UpdateProvideSection implements WorkerInterface { - public function __construct(private readonly JsonFile $pkgComposerJsonFile) {} + public function __construct(private JsonFile $pkgComposerJsonFile) {} public function apply(JsonFile $rootComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateReplaceSection.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateReplaceSection.php index 57322cfd..290dd5ab 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateReplaceSection.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateReplaceSection.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class UpdateReplaceSection implements WorkerInterface +final readonly class UpdateReplaceSection implements WorkerInterface { - public function __construct(private readonly JsonFile $pkgComposerJsonFile) {} + public function __construct(private JsonFile $pkgComposerJsonFile) {} public function apply(JsonFile $rootComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireDevSection.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireDevSection.php index 70c6dcaf..5d8f1b17 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireDevSection.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireDevSection.php @@ -13,9 +13,9 @@ * * @author Joshua Estes */ -final class UpdateRequireDevSection implements WorkerInterface +final readonly class UpdateRequireDevSection implements WorkerInterface { - public function __construct(private readonly JsonFile $pkgComposerJsonFile) {} + public function __construct(private JsonFile $pkgComposerJsonFile) {} public function apply(JsonFile $rootComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireSection.php b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireSection.php index 4524f2aa..0b49fcbd 100644 --- a/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireSection.php +++ b/src/SonsOfPHP/Bard/src/Worker/File/Composer/Root/UpdateRequireSection.php @@ -13,9 +13,9 @@ * * @author Joshua Estes */ -final class UpdateRequireSection implements WorkerInterface +final readonly class UpdateRequireSection implements WorkerInterface { - public function __construct(private readonly JsonFile $pkgComposerJsonFile) {} + public function __construct(private JsonFile $pkgComposerJsonFile) {} public function apply(JsonFile $rootComposerJsonFile): JsonFile { diff --git a/src/SonsOfPHP/Bridge/Doctrine/Collections/Pager/composer.json b/src/SonsOfPHP/Bridge/Doctrine/Collections/Pager/composer.json index 9ff71f0f..b3de330d 100644 --- a/src/SonsOfPHP/Bridge/Doctrine/Collections/Pager/composer.json +++ b/src/SonsOfPHP/Bridge/Doctrine/Collections/Pager/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "doctrine/collections": "^2", "sonsofphp/pager": "^0.3.x-dev" }, diff --git a/src/SonsOfPHP/Bridge/Doctrine/DBAL/Pager/composer.json b/src/SonsOfPHP/Bridge/Doctrine/DBAL/Pager/composer.json index 4da91f2e..4be23a91 100644 --- a/src/SonsOfPHP/Bridge/Doctrine/DBAL/Pager/composer.json +++ b/src/SonsOfPHP/Bridge/Doctrine/DBAL/Pager/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "doctrine/dbal": "^3", "sonsofphp/pager": "^0.3.x-dev" }, diff --git a/src/SonsOfPHP/Bridge/Doctrine/EventSourcing/composer.json b/src/SonsOfPHP/Bridge/Doctrine/EventSourcing/composer.json index c384f71c..f7b20945 100644 --- a/src/SonsOfPHP/Bridge/Doctrine/EventSourcing/composer.json +++ b/src/SonsOfPHP/Bridge/Doctrine/EventSourcing/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "doctrine/dbal": "^3", "sonsofphp/event-sourcing": "^0.3.x-dev" }, diff --git a/src/SonsOfPHP/Bridge/Doctrine/ORM/Pager/composer.json b/src/SonsOfPHP/Bridge/Doctrine/ORM/Pager/composer.json index 98f628ee..6564c490 100644 --- a/src/SonsOfPHP/Bridge/Doctrine/ORM/Pager/composer.json +++ b/src/SonsOfPHP/Bridge/Doctrine/ORM/Pager/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "doctrine/orm": "^2 || ^3", "sonsofphp/pager": "^0.3.x-dev" }, diff --git a/src/SonsOfPHP/Bridge/Symfony/Cqrs/composer.json b/src/SonsOfPHP/Bridge/Symfony/Cqrs/composer.json index c334601e..5fbb3a48 100644 --- a/src/SonsOfPHP/Bridge/Symfony/Cqrs/composer.json +++ b/src/SonsOfPHP/Bridge/Symfony/Cqrs/composer.json @@ -37,7 +37,7 @@ }, "minimum-stability": "dev", "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/cqrs": "^0.3.x-dev", "symfony/options-resolver": "^6 || ^7" }, diff --git a/src/SonsOfPHP/Bridge/Symfony/EventSourcing/composer.json b/src/SonsOfPHP/Bridge/Symfony/EventSourcing/composer.json index d28ca1cb..8eceb2ff 100644 --- a/src/SonsOfPHP/Bridge/Symfony/EventSourcing/composer.json +++ b/src/SonsOfPHP/Bridge/Symfony/EventSourcing/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/event-sourcing": "^0.3.x-dev", "symfony/uid": "^5 || ^6 || ^7", "symfony/security-bundle": "^6 || ^7" diff --git a/src/SonsOfPHP/Bridge/Twig/Money/composer.json b/src/SonsOfPHP/Bridge/Twig/Money/composer.json index fbc01884..0ae8d638 100644 --- a/src/SonsOfPHP/Bridge/Twig/Money/composer.json +++ b/src/SonsOfPHP/Bridge/Twig/Money/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/money": "^0.3.x-dev", "twig/twig": "^3.0" }, diff --git a/src/SonsOfPHP/Bundle/Cqrs/composer.json b/src/SonsOfPHP/Bundle/Cqrs/composer.json index dd84eedc..75af958d 100644 --- a/src/SonsOfPHP/Bundle/Cqrs/composer.json +++ b/src/SonsOfPHP/Bundle/Cqrs/composer.json @@ -37,7 +37,7 @@ } }, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/cqrs": "^0.3.x-dev", "symfony/dependency-injection": "^5 || ^6 || ^7", "symfony/http-kernel": "^5 || ^6 || ^7", diff --git a/src/SonsOfPHP/Component/Cache/SimpleCache.php b/src/SonsOfPHP/Component/Cache/SimpleCache.php index 9f8ba9f0..5b06b1a5 100644 --- a/src/SonsOfPHP/Component/Cache/SimpleCache.php +++ b/src/SonsOfPHP/Component/Cache/SimpleCache.php @@ -14,13 +14,13 @@ * * @author Joshua Estes */ -final class SimpleCache implements CacheInterface +final readonly class SimpleCache implements CacheInterface { /** * @codeCoverageIgnore */ public function __construct( - private readonly CacheItemPoolInterface $pool, + private CacheItemPoolInterface $pool, ) {} /** diff --git a/src/SonsOfPHP/Component/Cache/composer.json b/src/SonsOfPHP/Component/Cache/composer.json index 5126f2e8..1bf3f7bb 100644 --- a/src/SonsOfPHP/Component/Cache/composer.json +++ b/src/SonsOfPHP/Component/Cache/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/cache": "^2.0 || ^3.0" }, "require-dev": { diff --git a/src/SonsOfPHP/Component/Clock/Date.php b/src/SonsOfPHP/Component/Clock/Date.php index b94c305e..0397a58f 100644 --- a/src/SonsOfPHP/Component/Clock/Date.php +++ b/src/SonsOfPHP/Component/Clock/Date.php @@ -9,9 +9,9 @@ /** * @author Joshua Estes */ -final class Date implements DateInterface, Stringable +final readonly class Date implements DateInterface, Stringable { - public function __construct(private readonly int $year, private readonly int $month, private readonly int $day) {} + public function __construct(private int $year, private int $month, private int $day) {} /** * @see self::toString() */ diff --git a/src/SonsOfPHP/Component/Clock/DateTime.php b/src/SonsOfPHP/Component/Clock/DateTime.php index fe0bd781..e19e731b 100644 --- a/src/SonsOfPHP/Component/Clock/DateTime.php +++ b/src/SonsOfPHP/Component/Clock/DateTime.php @@ -9,9 +9,9 @@ /** * @author Joshua Estes */ -final class DateTime implements DateTimeInterface, Stringable +final readonly class DateTime implements DateTimeInterface, Stringable { - public function __construct(private readonly DateInterface $date, private readonly TimeInterface $time, private readonly ZoneInterface $zone) {} + public function __construct(private DateInterface $date, private TimeInterface $time, private ZoneInterface $zone) {} /** * @see self::toString() */ diff --git a/src/SonsOfPHP/Component/Clock/Time.php b/src/SonsOfPHP/Component/Clock/Time.php index 372ca37d..caaac49e 100644 --- a/src/SonsOfPHP/Component/Clock/Time.php +++ b/src/SonsOfPHP/Component/Clock/Time.php @@ -9,13 +9,13 @@ /** * @author Joshua Estes */ -final class Time implements TimeInterface, Stringable +final readonly class Time implements TimeInterface, Stringable { public function __construct( - private readonly int $hour, - private readonly int $minute, - private readonly int $second, - private readonly int $millisecond + private int $hour, + private int $minute, + private int $second, + private int $millisecond ) {} public function __toString(): string { diff --git a/src/SonsOfPHP/Component/Clock/Zone.php b/src/SonsOfPHP/Component/Clock/Zone.php index 36b1dbd2..cc812d4e 100644 --- a/src/SonsOfPHP/Component/Clock/Zone.php +++ b/src/SonsOfPHP/Component/Clock/Zone.php @@ -9,11 +9,11 @@ /** * @author Joshua Estes */ -final class Zone implements ZoneInterface, Stringable +final readonly class Zone implements ZoneInterface, Stringable { public function __construct( - private readonly string $name, - private readonly ZoneOffsetInterface $offset, + private string $name, + private ZoneOffsetInterface $offset, ) {} public function __toString(): string { diff --git a/src/SonsOfPHP/Component/Clock/ZoneOffset.php b/src/SonsOfPHP/Component/Clock/ZoneOffset.php index 6c005bbc..18c17590 100644 --- a/src/SonsOfPHP/Component/Clock/ZoneOffset.php +++ b/src/SonsOfPHP/Component/Clock/ZoneOffset.php @@ -9,10 +9,10 @@ /** * @author Joshua Estes */ -final class ZoneOffset implements ZoneOffsetInterface, Stringable +final readonly class ZoneOffset implements ZoneOffsetInterface, Stringable { public function __construct( - private readonly int $seconds, + private int $seconds, ) {} public function __toString(): string { diff --git a/src/SonsOfPHP/Component/Clock/composer.json b/src/SonsOfPHP/Component/Clock/composer.json index 5ae977cc..4c675f88 100644 --- a/src/SonsOfPHP/Component/Clock/composer.json +++ b/src/SonsOfPHP/Component/Clock/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/clock": "^1.0" }, "extra": { diff --git a/src/SonsOfPHP/Component/Container/composer.json b/src/SonsOfPHP/Component/Container/composer.json index 31ef2458..e7bb3f49 100644 --- a/src/SonsOfPHP/Component/Container/composer.json +++ b/src/SonsOfPHP/Component/Container/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/container": "^1.0 || ^2.0" }, "provide": { diff --git a/src/SonsOfPHP/Component/Cookie/composer.json b/src/SonsOfPHP/Component/Cookie/composer.json index 96bc1774..5bbe7384 100644 --- a/src/SonsOfPHP/Component/Cookie/composer.json +++ b/src/SonsOfPHP/Component/Cookie/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/cookie-contract": "0.3.x-dev" }, "provide": { diff --git a/src/SonsOfPHP/Component/Cqrs/Attribute/AsMessageHandler.php b/src/SonsOfPHP/Component/Cqrs/Attribute/AsMessageHandler.php index 52abcdde..2f47365b 100644 --- a/src/SonsOfPHP/Component/Cqrs/Attribute/AsMessageHandler.php +++ b/src/SonsOfPHP/Component/Cqrs/Attribute/AsMessageHandler.php @@ -14,9 +14,9 @@ * @author Joshua Estes */ #[Attribute(Attribute::TARGET_PROPERTY)] -final class AsMessageHandler +final readonly class AsMessageHandler { public function __construct( - public readonly string $messageClass, + public string $messageClass, ) {} } diff --git a/src/SonsOfPHP/Component/Cqrs/composer.json b/src/SonsOfPHP/Component/Cqrs/composer.json index dc5b128e..ee4625b2 100644 --- a/src/SonsOfPHP/Component/Cqrs/composer.json +++ b/src/SonsOfPHP/Component/Cqrs/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/cqrs-contract": "0.3.x-dev" }, "require-dev": { diff --git a/src/SonsOfPHP/Component/EventDispatcher/composer.json b/src/SonsOfPHP/Component/EventDispatcher/composer.json index 9a967a1e..221a1bfb 100644 --- a/src/SonsOfPHP/Component/EventDispatcher/composer.json +++ b/src/SonsOfPHP/Component/EventDispatcher/composer.json @@ -30,7 +30,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/event-dispatcher": "^1.0" }, "provide": { diff --git a/src/SonsOfPHP/Component/EventSourcing/Aggregate/AggregateVersion.php b/src/SonsOfPHP/Component/EventSourcing/Aggregate/AggregateVersion.php index 926504ef..8aa94baf 100644 --- a/src/SonsOfPHP/Component/EventSourcing/Aggregate/AggregateVersion.php +++ b/src/SonsOfPHP/Component/EventSourcing/Aggregate/AggregateVersion.php @@ -11,9 +11,9 @@ * * @author Joshua Estes */ -final class AggregateVersion implements AggregateVersionInterface +final readonly class AggregateVersion implements AggregateVersionInterface { - public function __construct(private readonly int $version = 0) + public function __construct(private int $version = 0) { if (!$this->isValid()) { throw new EventSourcingException(sprintf('Version "%s" is invalid.', $this->version)); diff --git a/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/Handler/EventTypeMessageEnricherHandler.php b/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/Handler/EventTypeMessageEnricherHandler.php index 674f15a2..30a62dd1 100644 --- a/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/Handler/EventTypeMessageEnricherHandler.php +++ b/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/Handler/EventTypeMessageEnricherHandler.php @@ -15,9 +15,9 @@ * * @author Joshua Estes */ -final class EventTypeMessageEnricherHandler implements MessageEnricherHandlerInterface +final readonly class EventTypeMessageEnricherHandler implements MessageEnricherHandlerInterface { - public function __construct(private readonly MessageProviderInterface $messageProvider) {} + public function __construct(private MessageProviderInterface $messageProvider) {} public function enrich(MessageInterface $message): MessageInterface { diff --git a/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/MessageEnricher.php b/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/MessageEnricher.php index 550bce39..f1730f33 100644 --- a/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/MessageEnricher.php +++ b/src/SonsOfPHP/Component/EventSourcing/Message/Enricher/MessageEnricher.php @@ -10,9 +10,9 @@ /** * @author Joshua Estes */ -final class MessageEnricher implements MessageEnricherInterface +final readonly class MessageEnricher implements MessageEnricherInterface { - public function __construct(private readonly MessageEnricherProviderInterface $provider) {} + public function __construct(private MessageEnricherProviderInterface $provider) {} public function enrich(MessageInterface $message): MessageInterface { diff --git a/src/SonsOfPHP/Component/EventSourcing/Message/Upcaster/MessageUpcaster.php b/src/SonsOfPHP/Component/EventSourcing/Message/Upcaster/MessageUpcaster.php index 2862fa7a..8fc1278f 100644 --- a/src/SonsOfPHP/Component/EventSourcing/Message/Upcaster/MessageUpcaster.php +++ b/src/SonsOfPHP/Component/EventSourcing/Message/Upcaster/MessageUpcaster.php @@ -9,9 +9,9 @@ /** * @author Joshua Estes */ -final class MessageUpcaster implements MessageUpcasterInterface +final readonly class MessageUpcaster implements MessageUpcasterInterface { - public function __construct(private readonly MessageUpcasterProviderInterface $provider) {} + public function __construct(private MessageUpcasterProviderInterface $provider) {} public function upcast(array $data): array { diff --git a/src/SonsOfPHP/Component/EventSourcing/composer.json b/src/SonsOfPHP/Component/EventSourcing/composer.json index bd6f9f36..3407f560 100644 --- a/src/SonsOfPHP/Component/EventSourcing/composer.json +++ b/src/SonsOfPHP/Component/EventSourcing/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/event-sourcing-contract": "^0.3.x-dev", "sonsofphp/event-dispatcher": "^0.3.x-dev" }, diff --git a/src/SonsOfPHP/Component/FeatureToggle/Feature.php b/src/SonsOfPHP/Component/FeatureToggle/Feature.php index 1a5d8c0c..63ae8324 100644 --- a/src/SonsOfPHP/Component/FeatureToggle/Feature.php +++ b/src/SonsOfPHP/Component/FeatureToggle/Feature.php @@ -13,9 +13,9 @@ * * @author Joshua Estes */ -final class Feature implements FeatureInterface +final readonly class Feature implements FeatureInterface { - public function __construct(private readonly string $key, private readonly ToggleInterface $toggle) {} + public function __construct(private string $key, private ToggleInterface $toggle) {} public function getKey(): string { diff --git a/src/SonsOfPHP/Component/FeatureToggle/composer.json b/src/SonsOfPHP/Component/FeatureToggle/composer.json index dd1ed776..c9665f21 100644 --- a/src/SonsOfPHP/Component/FeatureToggle/composer.json +++ b/src/SonsOfPHP/Component/FeatureToggle/composer.json @@ -35,7 +35,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/feature-toggle-contract": "0.3.x-dev" }, "provide": { diff --git a/src/SonsOfPHP/Component/Filesystem/Adapter/ChainAdapter.php b/src/SonsOfPHP/Component/Filesystem/Adapter/ChainAdapter.php index 8cac555a..43820659 100644 --- a/src/SonsOfPHP/Component/Filesystem/Adapter/ChainAdapter.php +++ b/src/SonsOfPHP/Component/Filesystem/Adapter/ChainAdapter.php @@ -15,10 +15,10 @@ * * @author Joshua Estes */ -final class ChainAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface +final readonly class ChainAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface { public function __construct( - private readonly iterable $adapters, + private iterable $adapters, ) {} public function add(string $path, mixed $contents, ?ContextInterface $context = null): void diff --git a/src/SonsOfPHP/Component/Filesystem/Adapter/NativeAdapter.php b/src/SonsOfPHP/Component/Filesystem/Adapter/NativeAdapter.php index d5dd6ed1..c0d29862 100644 --- a/src/SonsOfPHP/Component/Filesystem/Adapter/NativeAdapter.php +++ b/src/SonsOfPHP/Component/Filesystem/Adapter/NativeAdapter.php @@ -14,10 +14,10 @@ * * @author Joshua Estes */ -final class NativeAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface +final readonly class NativeAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface { public function __construct( - private readonly string $prefix, + private string $prefix, ) {} public function add(string $path, mixed $contents, ?ContextInterface $context = null): void diff --git a/src/SonsOfPHP/Component/Filesystem/Adapter/ReadOnlyAdapter.php b/src/SonsOfPHP/Component/Filesystem/Adapter/ReadOnlyAdapter.php index 65d86e67..ce468ad8 100644 --- a/src/SonsOfPHP/Component/Filesystem/Adapter/ReadOnlyAdapter.php +++ b/src/SonsOfPHP/Component/Filesystem/Adapter/ReadOnlyAdapter.php @@ -16,10 +16,10 @@ * * @author Joshua Estes */ -final class ReadOnlyAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface +final readonly class ReadOnlyAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface { public function __construct( - private readonly AdapterInterface $adapter, + private AdapterInterface $adapter, ) {} public function add(string $path, mixed $contents, ?ContextInterface $context = null): void diff --git a/src/SonsOfPHP/Component/Filesystem/Adapter/WormAdapter.php b/src/SonsOfPHP/Component/Filesystem/Adapter/WormAdapter.php index a11de22c..fe11e82e 100644 --- a/src/SonsOfPHP/Component/Filesystem/Adapter/WormAdapter.php +++ b/src/SonsOfPHP/Component/Filesystem/Adapter/WormAdapter.php @@ -17,10 +17,10 @@ * * @author Joshua Estes */ -final class WormAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface +final readonly class WormAdapter implements AdapterInterface, CopyAwareInterface, DirectoryAwareInterface, MoveAwareInterface { public function __construct( - private readonly AdapterInterface $adapter, + private AdapterInterface $adapter, ) {} public function add(string $path, mixed $contents, ?ContextInterface $context = null): void diff --git a/src/SonsOfPHP/Component/Filesystem/Filesystem.php b/src/SonsOfPHP/Component/Filesystem/Filesystem.php index aa73b9d6..d8a52ec1 100644 --- a/src/SonsOfPHP/Component/Filesystem/Filesystem.php +++ b/src/SonsOfPHP/Component/Filesystem/Filesystem.php @@ -12,10 +12,10 @@ /** * @author Joshua Estes */ -final class Filesystem implements FilesystemInterface +final readonly class Filesystem implements FilesystemInterface { public function __construct( - private readonly AdapterInterface $adapter, + private AdapterInterface $adapter, ) {} public function write(string $path, mixed $contents, ?ContextInterface $context = null): void diff --git a/src/SonsOfPHP/Component/Filesystem/composer.json b/src/SonsOfPHP/Component/Filesystem/composer.json index 758f58ca..2543bb22 100644 --- a/src/SonsOfPHP/Component/Filesystem/composer.json +++ b/src/SonsOfPHP/Component/Filesystem/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/filesystem-contract": "0.3.x-dev" }, "provide": { diff --git a/src/SonsOfPHP/Component/HttpFactory/composer.json b/src/SonsOfPHP/Component/HttpFactory/composer.json index eb45106a..69789822 100644 --- a/src/SonsOfPHP/Component/HttpFactory/composer.json +++ b/src/SonsOfPHP/Component/HttpFactory/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/http-factory": "^1.0", "sonsofphp/http-message": "^0.3.x-dev" }, diff --git a/src/SonsOfPHP/Component/HttpHandler/composer.json b/src/SonsOfPHP/Component/HttpHandler/composer.json index 6df3c765..b2034ec7 100644 --- a/src/SonsOfPHP/Component/HttpHandler/composer.json +++ b/src/SonsOfPHP/Component/HttpHandler/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/http-handler-contract": "0.3.x-dev", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0" diff --git a/src/SonsOfPHP/Component/HttpMessage/composer.json b/src/SonsOfPHP/Component/HttpMessage/composer.json index 2aa5b69f..b567b6ed 100644 --- a/src/SonsOfPHP/Component/HttpMessage/composer.json +++ b/src/SonsOfPHP/Component/HttpMessage/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/http-message": "^1.0 || ^2.0" }, "suggest": { diff --git a/src/SonsOfPHP/Component/Json/JsonEncoder.php b/src/SonsOfPHP/Component/Json/JsonEncoder.php index a39a81e2..4e3d8ab7 100644 --- a/src/SonsOfPHP/Component/Json/JsonEncoder.php +++ b/src/SonsOfPHP/Component/Json/JsonEncoder.php @@ -27,7 +27,7 @@ public function encode($value): string * used. Especially useful when the recipient of the output is expecting an * object and the array is empty. */ - public function forceObject() + public function forceObject(): static { return $this->withFlags(\JSON_FORCE_OBJECT); } @@ -35,7 +35,7 @@ public function forceObject() /** * All " are converted to \u0022. */ - public function hexQuot() + public function hexQuot(): static { return $this->withFlags(\JSON_HEX_QUOT); } @@ -43,7 +43,7 @@ public function hexQuot() /** * All < and > are converted to \u003C and \u003E. */ - public function hexTag() + public function hexTag(): static { return $this->withFlags(\JSON_HEX_TAG); } @@ -51,7 +51,7 @@ public function hexTag() /** * All & are converted to \u0026. */ - public function hexAmp() + public function hexAmp(): static { return $this->withFlags(\JSON_HEX_AMP); } @@ -59,7 +59,7 @@ public function hexAmp() /** * All ' are converted to \u0027. */ - public function hexApos() + public function hexApos(): static { return $this->withFlags(\JSON_HEX_APOS); } @@ -67,7 +67,7 @@ public function hexApos() /** * Encodes numeric strings as numbers. */ - public function numericCheck() + public function numericCheck(): static { return $this->withFlags(\JSON_NUMERIC_CHECK); } @@ -75,7 +75,7 @@ public function numericCheck() /** * Substitute some unencodable values instead of failing. */ - public function partialOutputOnError() + public function partialOutputOnError(): static { return $this->withFlags(\JSON_PARTIAL_OUTPUT_ON_ERROR); } @@ -83,7 +83,7 @@ public function partialOutputOnError() /** * Ensures that float values are always encoded as a float value. */ - public function preserveZeroFraction() + public function preserveZeroFraction(): static { return $this->withFlags(\JSON_PRESERVE_ZERO_FRACTION); } @@ -91,7 +91,7 @@ public function preserveZeroFraction() /** * Use whitespace in returned data to format it. */ - public function prettyPrint() + public function prettyPrint(): static { return $this->withFlags(\JSON_PRETTY_PRINT); } @@ -101,7 +101,7 @@ public function prettyPrint() * supplied. It uses the same behaviour as it was before PHP 7.1 without * this constant. Available as of PHP 7.1.0. */ - public function unescapedLineTerminators() + public function unescapedLineTerminators(): static { return $this->withFlags(\JSON_UNESCAPED_LINE_TERMINATORS); } @@ -109,7 +109,7 @@ public function unescapedLineTerminators() /** * Don't escape /. */ - public function unescapedSlashes() + public function unescapedSlashes(): static { return $this->withFlags(\JSON_UNESCAPED_SLASHES); } @@ -117,7 +117,7 @@ public function unescapedSlashes() /** * Encode multibyte Unicode characters literally (default is to escape as \uXXXX). */ - public function unescapedUnicode() + public function unescapedUnicode(): static { return $this->withFlags(\JSON_UNESCAPED_UNICODE); } diff --git a/src/SonsOfPHP/Component/Json/composer.json b/src/SonsOfPHP/Component/Json/composer.json index 2e057834..34a5cc72 100644 --- a/src/SonsOfPHP/Component/Json/composer.json +++ b/src/SonsOfPHP/Component/Json/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-json": "*" }, "extra": { diff --git a/src/SonsOfPHP/Component/Link/composer.json b/src/SonsOfPHP/Component/Link/composer.json index b3a8b004..a67e2e84 100644 --- a/src/SonsOfPHP/Component/Link/composer.json +++ b/src/SonsOfPHP/Component/Link/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/link": "^1.0 || ^2.0" }, "provide": { diff --git a/src/SonsOfPHP/Component/Logger/Filter/MockFilter.php b/src/SonsOfPHP/Component/Logger/Filter/MockFilter.php index 2a322231..bf167c1a 100644 --- a/src/SonsOfPHP/Component/Logger/Filter/MockFilter.php +++ b/src/SonsOfPHP/Component/Logger/Filter/MockFilter.php @@ -10,10 +10,10 @@ /** * @author Joshua Estes */ -final class MockFilter implements FilterInterface +final readonly class MockFilter implements FilterInterface { public function __construct( - private readonly bool $isLoggable = true, + private bool $isLoggable = true, ) {} public function isLoggable(RecordInterface $record): bool diff --git a/src/SonsOfPHP/Component/Logger/composer.json b/src/SonsOfPHP/Component/Logger/composer.json index d83163e7..925d11cd 100644 --- a/src/SonsOfPHP/Component/Logger/composer.json +++ b/src/SonsOfPHP/Component/Logger/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1.0 || ^2.0 || ^3.0", "sonsofphp/logger-contract": "0.3.x-dev" }, diff --git a/src/SonsOfPHP/Component/Mailer/Mailer.php b/src/SonsOfPHP/Component/Mailer/Mailer.php index ffbc9ef4..519da070 100644 --- a/src/SonsOfPHP/Component/Mailer/Mailer.php +++ b/src/SonsOfPHP/Component/Mailer/Mailer.php @@ -13,11 +13,11 @@ /** * @author Joshua Estes */ -final class Mailer implements MailerInterface +final readonly class Mailer implements MailerInterface { public function __construct( - private readonly TransportInterface $transport, - private readonly MiddlewareHandlerInterface $handler = new MiddlewareHandler(), + private TransportInterface $transport, + private MiddlewareHandlerInterface $handler = new MiddlewareHandler(), ) {} public function addMiddleware(MiddlewareInterface $middleware): void diff --git a/src/SonsOfPHP/Component/Mailer/composer.json b/src/SonsOfPHP/Component/Mailer/composer.json index 477553d9..17ead7f4 100644 --- a/src/SonsOfPHP/Component/Mailer/composer.json +++ b/src/SonsOfPHP/Component/Mailer/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/mailer-contract": "0.3.x-dev" }, "provide": { diff --git a/src/SonsOfPHP/Component/Money/composer.json b/src/SonsOfPHP/Component/Money/composer.json index 22fe072c..0210f5ef 100644 --- a/src/SonsOfPHP/Component/Money/composer.json +++ b/src/SonsOfPHP/Component/Money/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-intl": "*", "sonsofphp/money-contract": "0.3.x-dev" }, diff --git a/src/SonsOfPHP/Component/Pager/composer.json b/src/SonsOfPHP/Component/Pager/composer.json index c4816949..1eec4d52 100644 --- a/src/SonsOfPHP/Component/Pager/composer.json +++ b/src/SonsOfPHP/Component/Pager/composer.json @@ -30,7 +30,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/pager-contract": "0.3.x-dev" }, "provide": { diff --git a/src/SonsOfPHP/Component/Version/composer.json b/src/SonsOfPHP/Component/Version/composer.json index cfe72c9e..767e40df 100644 --- a/src/SonsOfPHP/Component/Version/composer.json +++ b/src/SonsOfPHP/Component/Version/composer.json @@ -30,7 +30,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "sonsofphp/version-contract": "0.3.x-dev" }, "provide": { diff --git a/src/SonsOfPHP/Contract/Common/composer.json b/src/SonsOfPHP/Contract/Common/composer.json index 9fcbe5dc..9e87f8b8 100644 --- a/src/SonsOfPHP/Contract/Common/composer.json +++ b/src/SonsOfPHP/Contract/Common/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Cookie/composer.json b/src/SonsOfPHP/Contract/Cookie/composer.json index 6aed6a6c..c5308723 100644 --- a/src/SonsOfPHP/Contract/Cookie/composer.json +++ b/src/SonsOfPHP/Contract/Cookie/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Cqrs/composer.json b/src/SonsOfPHP/Contract/Cqrs/composer.json index fec7bbd4..e01af0c4 100644 --- a/src/SonsOfPHP/Contract/Cqrs/composer.json +++ b/src/SonsOfPHP/Contract/Cqrs/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/EventSourcing/composer.json b/src/SonsOfPHP/Contract/EventSourcing/composer.json index e800175c..89266cdc 100644 --- a/src/SonsOfPHP/Contract/EventSourcing/composer.json +++ b/src/SonsOfPHP/Contract/EventSourcing/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/FeatureToggle/composer.json b/src/SonsOfPHP/Contract/FeatureToggle/composer.json index 9a31921f..071e86e2 100644 --- a/src/SonsOfPHP/Contract/FeatureToggle/composer.json +++ b/src/SonsOfPHP/Contract/FeatureToggle/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Filesystem/composer.json b/src/SonsOfPHP/Contract/Filesystem/composer.json index a0540438..4f5aac56 100644 --- a/src/SonsOfPHP/Contract/Filesystem/composer.json +++ b/src/SonsOfPHP/Contract/Filesystem/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/HttpHandler/composer.json b/src/SonsOfPHP/Contract/HttpHandler/composer.json index e4e91617..34ff58c2 100644 --- a/src/SonsOfPHP/Contract/HttpHandler/composer.json +++ b/src/SonsOfPHP/Contract/HttpHandler/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0" }, diff --git a/src/SonsOfPHP/Contract/Logger/composer.json b/src/SonsOfPHP/Contract/Logger/composer.json index bd6be7cb..b8e72497 100644 --- a/src/SonsOfPHP/Contract/Logger/composer.json +++ b/src/SonsOfPHP/Contract/Logger/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Mailer/composer.json b/src/SonsOfPHP/Contract/Mailer/composer.json index 1bff7fec..cf094358 100644 --- a/src/SonsOfPHP/Contract/Mailer/composer.json +++ b/src/SonsOfPHP/Contract/Mailer/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Money/composer.json b/src/SonsOfPHP/Contract/Money/composer.json index 9b352f32..5bc44939 100644 --- a/src/SonsOfPHP/Contract/Money/composer.json +++ b/src/SonsOfPHP/Contract/Money/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Pager/composer.json b/src/SonsOfPHP/Contract/Pager/composer.json index fa1666a6..01028cde 100644 --- a/src/SonsOfPHP/Contract/Pager/composer.json +++ b/src/SonsOfPHP/Contract/Pager/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true, diff --git a/src/SonsOfPHP/Contract/Version/composer.json b/src/SonsOfPHP/Contract/Version/composer.json index c2aa9834..c7e15b0e 100644 --- a/src/SonsOfPHP/Contract/Version/composer.json +++ b/src/SonsOfPHP/Contract/Version/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "extra": { "sort-packages": true,