Skip to content

Commit 9b4c376

Browse files
author
Stepan Zolotarev
committed
Update dependencies
1 parent bc2be3f commit 9b4c376

File tree

9 files changed

+70
-82
lines changed

9 files changed

+70
-82
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install PHP
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: 8.1
16+
php-version: 8.2
1717
coverage: none
1818
tools: composer:v2
1919

@@ -33,7 +33,7 @@ jobs:
3333
- name: Install PHP
3434
uses: shivammathur/setup-php@v2
3535
with:
36-
php-version: 8.1
36+
php-version: 8.2
3737
coverage: none
3838
tools: composer:v2
3939

@@ -53,7 +53,7 @@ jobs:
5353
- name: Install PHP
5454
uses: shivammathur/setup-php@v2
5555
with:
56-
php-version: 8.1
56+
php-version: 8.2
5757
coverage: none
5858
tools: composer:v2
5959

@@ -91,7 +91,7 @@ jobs:
9191
- name: Install PHP with extensions
9292
uses: shivammathur/setup-php@v2
9393
with:
94-
php-version: 8.1
94+
php-version: 8.2
9595
extensions: ${{ env.PHP_EXTENSIONS }}
9696
ini-values: ${{ env.PHP_INI_VALUES }}
9797
tools: composer:v2

composer.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,31 @@
4343
]
4444
},
4545
"require": {
46-
"php": ">=8.1",
47-
"php-service-bus/storage": "v5.1.*",
48-
"php-service-bus/mutex": "v5.1.*",
49-
"php-service-bus/annotations-reader":"v5.1.*",
50-
"php-service-bus/messages-router": "v5.1.*",
51-
"php-service-bus/argument-resolver": "v5.1.*",
52-
"psr/log": "v1.1.*"
46+
"php": ">=8.2",
47+
"php-service-bus/storage": "v5.2",
48+
"php-service-bus/mutex": "v5.2",
49+
"php-service-bus/annotations-reader":"v5.2",
50+
"php-service-bus/messages-router": "v5.2",
51+
"php-service-bus/argument-resolver": "v5.2",
52+
"psr/log": "v3.*"
5353
},
5454
"require-dev": {
55-
"php-service-bus/code-style-config": "v5.1.*",
56-
"doctrine/dbal": "v3.2.*",
57-
"phpunit/phpunit": "v9.5.*",
58-
"vimeo/psalm": "v4.22.*",
59-
"phpstan/phpstan": "v1.5.*",
60-
"boesing/psalm-plugin-stringf": "v1.1.*"
55+
"doctrine/dbal": "^3.7",
56+
"php-service-bus/code-style-config": "v5.2",
57+
"phpunit/phpunit": "^10.0 || ^11.0",
58+
"vimeo/psalm": "^4.30 || ^5.4",
59+
"phpstan/phpstan": "^1.12 || ^2.0"
6160
},
6261
"prefer-stable": true,
6362
"minimum-stability": "stable",
6463
"scripts": {
65-
"psalm": "rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml --show-info=true",
66-
"phpstan": "./vendor/bin/phpstan analyse src --level 9",
67-
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose --debug",
68-
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose --debug",
64+
"psalm": "rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml",
65+
"phpstan": "./vendor/bin/phpstan analyse src",
66+
"tests": "./vendor/bin/phpunit --configuration phpunit.xml",
67+
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage",
6968
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
7069
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes",
71-
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src --level 9 && ./vendor/bin/phpunit --configuration phpunit.xml --verbose"
70+
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src && ./vendor/bin/phpunit --configuration phpunit.xml"
7271
},
7372
"config": {
7473
"optimize-autoloader": true,

phpstan.neon

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
parameters:
2-
checkMissingIterableValueType: false
3-
checkGenericClassInNonGenericObjectType: false
2+
level: 9
3+
ignoreErrors:
4+
- identifier: missingType.iterableValue
5+
- identifier: missingType.generics
6+
- identifier: method.unused
7+
- identifier: varTag.nativeType

phpunit.xml

Lines changed: 36 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,44 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
44
colors="true"
55
cacheResult="false"
6-
convertDeprecationsToExceptions="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
106
processIsolation="true"
117
stopOnError="false"
128
stopOnFailure="false"
139
beStrictAboutChangesToGlobalState="true"
14-
beStrictAboutOutputDuringTests="true"
15-
verbose="true"
16-
>
17-
<coverage>
18-
<include>
19-
<directory>./src</directory>
20-
</include>
21-
<exclude>
22-
<directory>./tests</directory>
23-
</exclude>
24-
</coverage>
25-
<php>
26-
<ini name="error_reporting" value="-1"/>
27-
<env name="TEST_POSTGRES_DSN" value="pgsql://test:123456789@localhost:5432/test"/>
28-
<env name="REDIS_CONNECTION_DSN" value="tcp://localhost:6379"/>
29-
</php>
30-
<testsuites>
31-
32-
<testsuite name="PHP Service Bus: Common component">
33-
<directory>./vendor/php-service-bus/common/tests/</directory>
34-
</testsuite>
35-
36-
<testsuite name="PHP Service Bus: Annotations (attributes) reader component">
37-
<directory>./vendor/php-service-bus/annotations-reader/tests/</directory>
38-
</testsuite>
39-
40-
<testsuite name="PHP Service Bus: Messages router component">
41-
<directory>./vendor/php-service-bus/messages-router/tests/</directory>
42-
</testsuite>
43-
44-
<testsuite name="PHP Service Bus: Mutex component">
45-
<directory>./vendor/php-service-bus/mutex/tests/</directory>
46-
</testsuite>
47-
48-
<testsuite name="PHP Service Bus: Storage component">
49-
<directory>./vendor/php-service-bus/storage/tests/</directory>
50-
</testsuite>
51-
52-
<testsuite name="PHP Service Bus: Sagas component">
53-
<directory>./tests/</directory>
54-
</testsuite>
55-
56-
</testsuites>
57-
</phpunit>
10+
beStrictAboutOutputDuringTests="true">
11+
<php>
12+
<ini name="error_reporting" value="-1"/>
13+
<env name="TEST_POSTGRES_DSN" value="pgsql://test:123456789@localhost:5432/test"/>
14+
<env name="REDIS_CONNECTION_DSN" value="tcp://localhost:6379"/>
15+
</php>
16+
<testsuites>
17+
<testsuite name="PHP Service Bus: Common component">
18+
<directory>./vendor/php-service-bus/common/tests/</directory>
19+
</testsuite>
20+
<testsuite name="PHP Service Bus: Annotations (attributes) reader component">
21+
<directory>./vendor/php-service-bus/annotations-reader/tests/</directory>
22+
</testsuite>
23+
<testsuite name="PHP Service Bus: Messages router component">
24+
<directory>./vendor/php-service-bus/messages-router/tests/</directory>
25+
</testsuite>
26+
<testsuite name="PHP Service Bus: Mutex component">
27+
<directory>./vendor/php-service-bus/mutex/tests/</directory>
28+
</testsuite>
29+
<testsuite name="PHP Service Bus: Storage component">
30+
<directory>./vendor/php-service-bus/storage/tests/</directory>
31+
</testsuite>
32+
<testsuite name="PHP Service Bus: Sagas component">
33+
<directory>./tests/</directory>
34+
</testsuite>
35+
</testsuites>
36+
<source>
37+
<include>
38+
<directory>./src</directory>
39+
</include>
40+
<exclude>
41+
<directory>./tests</directory>
42+
</exclude>
43+
</source>
44+
</phpunit>

psalm.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
<issueHandlers>
2121
<PropertyNotSetInConstructor errorLevel="suppress"/>
2222
<UnnecessaryVarAnnotation errorLevel="suppress"/>
23+
<RiskyTruthyFalsyComparison errorLevel="suppress"/>
2324
</issueHandlers>
24-
<plugins>
25-
<pluginClass class="Boesing\PsalmPluginStringf\Plugin"/>
26-
</plugins>
2725
</psalm>

src/Configuration/Attributes/SagaAttributeBasedConfigurationLoader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ private function extractMessageClass(\ReflectionMethod $reflectionMethod): strin
206206
/** @psalm-var class-string $messageClass */
207207
$messageClass = $reflectionType->getName();
208208

209-
/** @psalm-suppress RedundantConditionGivenDocblockType */
210209
if (\class_exists($messageClass))
211210
{
212211
return $messageClass;

src/SagaFinder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function () use ($id, $context, $onLoaded): \Generator
6464
/** Non-expired saga */
6565
if ($saga->expireDate() > now())
6666
{
67+
/** @psalm-suppress PossiblyInvalidArgument */
6768
return yield call($onLoaded, $saga);
6869
}
6970

src/SagaMessageExecutor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function retryStrategy(): ?RetryStrategy
4848

4949
public function __invoke(object $message, ServiceBusContext $context): Promise
5050
{
51+
/** @phpstan-ignore return.type */
5152
return call($this->messageHandler->closure, $message, $context);
5253
}
5354
}

src/Store/Sql/SQLSagaStore.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,7 @@ function () use ($id): \Generator
140140
if ($result !== null)
141141
{
142142
$payload = $result['payload'];
143-
144-
if ($this->adapter instanceof BinaryDataDecoder)
145-
{
146-
$payload = $this->adapter->unescapeBinary($payload);
147-
}
143+
$payload = $this->adapter->unescapeBinary($payload);
148144

149145
/** @psalm-var Saga $saga */
150146
$saga = unserializeSaga($payload);
@@ -226,12 +222,14 @@ static function (QueryExecutor $executor) use ($saga, $publisher): \Generator
226222

227223
yield self::processAssociations($saga, $executor);
228224

225+
/** @psalm-suppress PossiblyInvalidArgument */
229226
yield call($publisher);
230227
}
231228
);
232229
}
233230
catch (UniqueConstraintViolationCheckFailed $exception)
234231
{
232+
/** @psalm-suppress RedundantCast */
235233
throw new DuplicateSaga('Duplicate saga id', (int) $exception->getCode(), $exception);
236234
}
237235
catch (\Throwable $throwable)
@@ -279,6 +277,7 @@ static function (QueryExecutor $executor) use ($saga, $publisher): \Generator
279277

280278
yield self::processAssociations($saga, $executor);
281279

280+
/** @psalm-suppress PossiblyInvalidArgument */
282281
yield call($publisher);
283282
}
284283
);

0 commit comments

Comments
 (0)