From 67c0b217a7b14830cbe3eb0efe58d128b0c09bc7 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 10:17:53 +0300 Subject: [PATCH 1/8] Add Symfony 7 support to composer constraints --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 9f2800eb..2611aaee 100644 --- a/composer.json +++ b/composer.json @@ -6,10 +6,10 @@ "require": { "php": ">=8.0", "doctrine/inflector": "~1.4.2 || ~2.0.0", - "symfony/console": "^4.0.0 || ^5.3 || ^6.0", - "symfony/finder": "^4.0.0 || ^5.3 || ^6.0", - "symfony/process": "^4.0.0 || ^5.4 || ^6.0", - "symfony/property-access": "^4.0.0 || ^5.4 || ^6.0" + "symfony/console": "^4.0.0 || ^5.3 || ^6.0 || ^7.0", + "symfony/finder": "^4.0.0 || ^5.3 || ^6.0 || ^7.0", + "symfony/process": "^4.0.0 || ^5.4 || ^6.0 || ^7.0", + "symfony/property-access": "^4.0.0 || ^5.4 || ^6.0 || ^7.0" }, "require-dev": { "codeception/codeception": "^5.0.0", @@ -18,7 +18,7 @@ "sllh/composer-versions-check": "^2.0", "spryker-sdk/architector": "0.1.x-dev", "spryker/code-sniffer": "^0.17.20", - "symfony/var-dumper": "^6.0.0" + "symfony/var-dumper": "^6.0.0 || ^7.0.0" }, "autoload": { "psr-4": { From 8c4cd70eadccd4c986d9bd06d22a1ade61c02d69 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 12:18:26 +0300 Subject: [PATCH 2/8] updated ci --- .github/workflows/ci.yml | 12 ++++++------ composer.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1327a1c8..5e749b51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1' + '8.3' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -35,7 +35,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Composer cache - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -78,10 +78,10 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1' + '8.3' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -95,7 +95,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Composer cache - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} diff --git a/composer.json b/composer.json index 2611aaee..66c26895 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "SDK for AsyncAPI.", "license": "proprietary", "require": { - "php": ">=8.0", + "php": ">=8.3", "doctrine/inflector": "~1.4.2 || ~2.0.0", "symfony/console": "^4.0.0 || ^5.3 || ^6.0 || ^7.0", "symfony/finder": "^4.0.0 || ^5.3 || ^6.0 || ^7.0", From 5c9cc633612d144ee9d47fb4946d31c92225fce3 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 13:21:14 +0300 Subject: [PATCH 3/8] Run CI on PHP 8.3 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1327a1c8..b5bbe13b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1' + '8.3' ] steps: - uses: actions/checkout@v3 @@ -78,7 +78,7 @@ jobs: fail-fast: false matrix: php-version: [ - '8.1' + '8.3' ] steps: - uses: actions/checkout@v3 From fcfd618f4e2c714c5c1867d0367c10f689af03c9 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 13:51:54 +0300 Subject: [PATCH 4/8] testing extension --- composer.json | 2 +- phpstan.neon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 66c26895..77fb4101 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "codeception/module-asserts": "^3.0.0", "mikey179/vfsstream": "^1.6.10", "sllh/composer-versions-check": "^2.0", - "spryker-sdk/architector": "0.1.x-dev", + "spryker-sdk/architector": "dev-feature/frw-11816/symfony-7-support", "spryker/code-sniffer": "^0.17.20", "symfony/var-dumper": "^6.0.0 || ^7.0.0" }, diff --git a/phpstan.neon b/phpstan.neon index bc4abc82..247de280 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,5 @@ parameters: level: 8 - checkMissingIterableValueType: false bootstrapFiles: - phpstan-bootstrap.php @@ -8,5 +7,6 @@ parameters: ignoreErrors: - '#Parameter .+ of method .+Transfer::.+\(\).+ given.#' - '#Binary operation .+ results in an error.#' + - '#has no value type specified in iterable type#' reportUnmatchedIgnoredErrors: false From 3227d7d30db80fd8cf2edd1fb9e02f0ba828e500 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 13:53:03 +0300 Subject: [PATCH 5/8] testing extension --- phpstan.neon | 2 +- src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php | 4 +++- src/SprykerSdk/AsyncApi/AsyncApiConfig.php | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 247de280..523317b2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,6 +7,6 @@ parameters: ignoreErrors: - '#Parameter .+ of method .+Transfer::.+\(\).+ given.#' - '#Binary operation .+ results in an error.#' - - '#has no value type specified in iterable type#' + - '#no value type specified in iterable type#' reportUnmatchedIgnoredErrors: false diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php index a9e74a6a..4927c911 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Loader/AsyncApiLoader.php @@ -55,7 +55,9 @@ protected function validateRemotePath(string $asyncApiPath): void { // phpcs:disable if (@file_get_contents($asyncApiPath) === false) { - throw new InvalidFilePathException(sprintf('The remote file "%s" could not be loaded. Error: "%s"', $asyncApiPath, error_get_last() ? error_get_last()['message'] : 'Unknown error')); + $lastError = error_get_last(); + + throw new InvalidFilePathException(sprintf('The remote file "%s" could not be loaded. Error: "%s"', $asyncApiPath, $lastError ? $lastError['message'] : 'Unknown error')); } } diff --git a/src/SprykerSdk/AsyncApi/AsyncApiConfig.php b/src/SprykerSdk/AsyncApi/AsyncApiConfig.php index e51bb4e6..ab217bbb 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApiConfig.php +++ b/src/SprykerSdk/AsyncApi/AsyncApiConfig.php @@ -46,8 +46,10 @@ public function getProjectRootPath(): string */ public function getSprykRunExecutablePath(): string { - if (getenv('INSTALLED_ROOT_DIRECTORY')) { - return getenv('INSTALLED_ROOT_DIRECTORY'); + $installedRootDirectory = getenv('INSTALLED_ROOT_DIRECTORY'); + + if ($installedRootDirectory) { + return $installedRootDirectory; } return (string)getcwd(); From 20e5c4031a6d83d4cf4ec459cb4acf8f52203ef0 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 13:56:55 +0300 Subject: [PATCH 6/8] Point architector at the SF7 fix branch, migrate architector.php to modern Rector config API, fix real PHPStan errors, and apply Rector's own auto-fixes - spryker-sdk/architector: 0.1.x-dev -> dev-feature/frw-11816/symfony-7-support (temporary, for testing; revert once the architector PR is merged) - phpstan.neon: remove obsolete checkMissingIterableValueType option (Rector 2.x pulls in phpstan/phpstan 2.x transitively), restore equivalent leniency via ignoreErrors since the missing array value types are pre-existing and out of scope here - fix 2 real errors phpstan 2.x now catches: error_get_last()/getenv() called twice assuming the same narrowed result across both calls - architector.php: RectorConfig::parameters()->set(Option::SKIP, ...) removed in Rector 2.x, replaced with skip(); 4 skipped rule classes no longer exist and were dropped, SimplifyUselessVariableRector's namespace changed - ran composer rector to apply the now-passing dead-code/php74 rule sets: 11 files with redundant @return docblocks (duplicating the native return type) and 2 properties with redundant/unsafe '= null' defaults - reverted one of those two: AbstractAsyncApiMessage::$isWindows is a *static* property only assigned in the instance constructor, so removing its default broke real usage (Typed static property must not be accessed before initialization) even though Rector's static analysis considered it safe; caught by running the actual test suite, not just static analysis --- architector.php | 13 ++----------- src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php | 2 -- .../AsyncApi/AsyncApi/AsyncApiInterface.php | 2 -- .../AsyncApi/AsyncApi/Channel/AsyncApiChannel.php | 4 ---- .../AsyncApi/Channel/AsyncApiChannelCollection.php | 2 -- .../Channel/AsyncApiChannelCollectionInterface.php | 2 -- .../AsyncApi/Channel/AsyncApiChannelInterface.php | 4 ---- .../AsyncApi/Message/AsyncApiMessageCollection.php | 2 -- .../Message/AsyncApiMessageCollectionInterface.php | 2 -- .../AsyncApi/Code/Builder/AsyncApiCodeBuilder.php | 2 -- src/SprykerSdk/AsyncApi/Console/AbstractConsole.php | 2 +- 11 files changed, 3 insertions(+), 34 deletions(-) diff --git a/architector.php b/architector.php index fa3a43b0..c1928709 100644 --- a/architector.php +++ b/architector.php @@ -5,18 +5,13 @@ * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. */ -use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector; +use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; use Rector\Config\RectorConfig; -use Rector\Core\Configuration\Option; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector; -use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector; -use Rector\EarlyReturn\Rector\If_\ChangeOrIfReturnToEarlyReturnRector; -use Rector\EarlyReturn\Rector\Return_\ReturnBinaryAndToEarlyReturnRector; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; -use Rector\Php74\Rector\Property\TypedPropertyRector; use Rector\Set\ValueObject\SetList; defined('APPLICATION_ROOT_DIR') || define('APPLICATION_ROOT_DIR', __DIR__); @@ -26,16 +21,12 @@ $rectorConfig->import(SetList::EARLY_RETURN); $rectorConfig->import(SetList::PHP_74); - $rectorConfig->parameters()->set(Option::SKIP, [ - ChangeAndIfToEarlyReturnRector::class, - ChangeOrIfReturnToEarlyReturnRector::class, + $rectorConfig->skip([ ClosureToArrowFunctionRector::class, RemoveUselessParamTagRector::class, RemoveUnusedPromotedPropertyRector::class, RemoveUselessReturnTagRector::class, - ReturnBinaryAndToEarlyReturnRector::class, SimplifyUselessVariableRector::class, - TypedPropertyRector::class, RemoveUselessVarTagRector::class ]); }; diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php index 8c2f9174..455bba99 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApi.php @@ -35,8 +35,6 @@ public function getChannels(): iterable /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php index 2011cb23..e5405c13 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/AsyncApiInterface.php @@ -18,8 +18,6 @@ public function getChannels(): iterable; /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php index 41b68d99..5bc95878 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannel.php @@ -57,8 +57,6 @@ public function getPublishMessages(): iterable /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getPublishMessage(string $messageName): ?AsyncApiMessageInterface { @@ -75,8 +73,6 @@ public function getSubscribeMessages(): iterable /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getSubscribeMessage(string $messageName): ?AsyncApiMessageInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php index 73f2e299..930c328b 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollection.php @@ -34,8 +34,6 @@ public function getChannels(): iterable /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php index 78593dc4..cce38ff9 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelCollectionInterface.php @@ -16,8 +16,6 @@ public function getChannels(): iterable; /** * @param string $channelName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Channel\AsyncApiChannelInterface|null */ public function getChannel(string $channelName): ?AsyncApiChannelInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php index cb4a1e22..d8da113f 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Channel/AsyncApiChannelInterface.php @@ -23,8 +23,6 @@ public function getPublishMessages(): iterable; /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getPublishMessage(string $messageName): ?AsyncApiMessageInterface; @@ -35,8 +33,6 @@ public function getSubscribeMessages(): iterable; /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getSubscribeMessage(string $messageName): ?AsyncApiMessageInterface; } diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php index 033560f3..121d1495 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollection.php @@ -34,8 +34,6 @@ public function getMessages(): iterable /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getMessage(string $messageName): ?AsyncApiMessageInterface { diff --git a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php index 1c8d49a1..589f9195 100644 --- a/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php +++ b/src/SprykerSdk/AsyncApi/AsyncApi/Message/AsyncApiMessageCollectionInterface.php @@ -16,8 +16,6 @@ public function getMessages(): iterable; /** * @param string $messageName - * - * @return \SprykerSdk\AsyncApi\AsyncApi\Message\AsyncApiMessageInterface|null */ public function getMessage(string $messageName): ?AsyncApiMessageInterface; } diff --git a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php index 339a6bf2..4f9ed035 100644 --- a/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php +++ b/src/SprykerSdk/AsyncApi/Code/Builder/AsyncApiCodeBuilder.php @@ -363,8 +363,6 @@ protected function normalizeTransferType(string $type): string /** * @param string $propertyName - * - * @return string|null */ protected function getSingularized(string $propertyName): ?string { diff --git a/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php b/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php index 6092e3d1..878e441e 100644 --- a/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php +++ b/src/SprykerSdk/AsyncApi/Console/AbstractConsole.php @@ -29,7 +29,7 @@ class AbstractConsole extends Command /** * @var \SprykerSdk\AsyncApi\AsyncApiConfig|null */ - protected ?AsyncApiConfig $config = null; + protected ?AsyncApiConfig $config; /** * @var \SprykerSdk\AsyncApi\AsyncApiFacadeInterface|null From fe129db38216d3df50f2da115ad79f039ba811f3 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 14:00:00 +0300 Subject: [PATCH 7/8] Permanently skip RemoveDefaultValueFromAssignedPropertyRector for AbstractAsyncApiMessage::$isWindows Path-scoped skip so future 'composer rector' runs don't keep re-proposing this incorrect transform (it's a static property only assigned in the instance constructor, so Rector's constructor-assignment safety check doesn't hold for it). --- architector.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/architector.php b/architector.php index c1928709..4c0e0a69 100644 --- a/architector.php +++ b/architector.php @@ -10,6 +10,7 @@ use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; +use Rector\DeadCode\Rector\Property\RemoveDefaultValueFromAssignedPropertyRector; use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; use Rector\Set\ValueObject\SetList; @@ -27,6 +28,12 @@ RemoveUnusedPromotedPropertyRector::class, RemoveUselessReturnTagRector::class, SimplifyUselessVariableRector::class, - RemoveUselessVarTagRector::class + RemoveUselessVarTagRector::class, + // $isWindows is a static property only ever assigned inside the instance + // constructor; removing its default breaks any static-only access path + // that happens before the class is first instantiated. + RemoveDefaultValueFromAssignedPropertyRector::class => [ + __DIR__ . '/src/SprykerSdk/AsyncApi/Message/AbstractAsyncApiMessage.php', + ], ]); }; From ad13cb7dd3d601c33be932655ae7c7ea29f86ca4 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Tue, 28 Jul 2026 14:40:10 +0300 Subject: [PATCH 8/8] testing extension reterted --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 77fb4101..66c26895 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "codeception/module-asserts": "^3.0.0", "mikey179/vfsstream": "^1.6.10", "sllh/composer-versions-check": "^2.0", - "spryker-sdk/architector": "dev-feature/frw-11816/symfony-7-support", + "spryker-sdk/architector": "0.1.x-dev", "spryker/code-sniffer": "^0.17.20", "symfony/var-dumper": "^6.0.0 || ^7.0.0" },