Skip to content

Commit 672faa9

Browse files
author
Stepan Zolotarev
committed
Update dependencies
1 parent 0d9cf6d commit 672faa9

File tree

8 files changed

+45
-53
lines changed

8 files changed

+45
-53
lines changed

.github/workflows/continuous-integration.yml

+4-4
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

@@ -82,7 +82,7 @@ jobs:
8282
- name: Install PHP with extensions
8383
uses: shivammathur/setup-php@v2
8484
with:
85-
php-version: 8.1
85+
php-version: 8.2
8686
extensions: ${{ env.PHP_EXTENSIONS }}
8787
ini-values: ${{ env.PHP_INI_VALUES }}
8888
tools: composer:v2

composer.json

+10-11
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,27 @@
2727
}
2828
},
2929
"require": {
30-
"php": ">=8.1",
30+
"php": ">=8.2",
3131
"amphp/amp": "v2.6.*",
3232
"amphp/file": "v2.0.*",
33-
"amphp/redis": "v1.0.*"
33+
"amphp/redis": "v1.1.*"
3434
},
3535
"require-dev": {
36-
"php-service-bus/code-style-config": "v5.1.*",
37-
"phpunit/phpunit": "v9.5.*",
38-
"vimeo/psalm": "v4.22.*",
39-
"phpstan/phpstan": "v1.5.*",
40-
"boesing/psalm-plugin-stringf": "v1.1.*"
36+
"php-service-bus/code-style-config": "v5.2.x-dev",
37+
"phpunit/phpunit": "^10.0 || ^11.0",
38+
"vimeo/psalm": "^4.30 || ^5.4",
39+
"phpstan/phpstan": "^1.12 || ^2.0"
4140
},
4241
"prefer-stable": true,
4342
"minimum-stability": "stable",
4443
"scripts": {
4544
"psalm": "rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml",
46-
"phpstan": "./vendor/bin/phpstan analyse src --level 9",
47-
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose --debug",
48-
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose --debug",
45+
"phpstan": "./vendor/bin/phpstan analyse src",
46+
"tests": "./vendor/bin/phpunit --configuration phpunit.xml",
47+
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage",
4948
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
5049
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes",
51-
"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"
50+
"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"
5251
},
5352
"config": {
5453
"optimize-autoloader": true,

phpstan.neon

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
parameters:
2-
checkMissingIterableValueType: false
3-
checkGenericClassInNonGenericObjectType: false
2+
level: 9

phpunit.xml

+23-29
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
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="REDIS_CONNECTION_DSN" value="tcp://localhost:6379"/>
28-
</php>
29-
<testsuites>
30-
<testsuite name="PHP Service Bus: Common component">
31-
<directory>./tests/</directory>
32-
</testsuite>
33-
<testsuite name="PHP Service Bus: Mutex component">
34-
<directory>./tests/</directory>
35-
</testsuite>
36-
</testsuites>
37-
</phpunit>
10+
beStrictAboutOutputDuringTests="true">
11+
<php>
12+
<ini name="error_reporting" value="-1"/>
13+
<env name="REDIS_CONNECTION_DSN" value="tcp://localhost:6379"/>
14+
</php>
15+
<testsuites>
16+
<testsuite name="PHP Service Bus: Common component">
17+
<directory>./tests/</directory>
18+
</testsuite>
19+
<testsuite name="PHP Service Bus: Mutex component">
20+
<directory>./tests/</directory>
21+
</testsuite>
22+
</testsuites>
23+
<source>
24+
<include>
25+
<directory>./src</directory>
26+
</include>
27+
<exclude>
28+
<directory>./tests</directory>
29+
</exclude>
30+
</source>
31+
</phpunit>

psalm.xml

-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,4 @@
2121
<PropertyNotSetInConstructor errorLevel="suppress"/>
2222
<UnnecessaryVarAnnotation errorLevel="suppress"/>
2323
</issueHandlers>
24-
<plugins>
25-
<pluginClass class="Boesing\PsalmPluginStringf\Plugin"/>
26-
</plugins>
2724
</psalm>

src/InMemory/InMemoryMutexService.php

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static function () use ($id, $code): \Generator
3838

3939
InMemoryMutexStorage::instance()->lock($id);
4040

41+
/** @psalm-suppress PossiblyInvalidArgument */
4142
yield call($code);
4243
}
4344
finally

src/MutexService.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
interface MutexService
1818
{
1919
/**
20-
* @template T as Promise|\Generator|mixed
21-
*
2220
* @psalm-param non-empty-string $id
23-
* @psalm-param callable(): T $code
21+
* @psalm-param callable(): mixed $code
2422
*
25-
* @return Promise<mixed>
23+
* @return Promise<mixed|void>
2624
*/
2725
public function withLock(string $id, callable $code): Promise;
2826
}

src/Redis/RedisMutexService.php

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ function () use ($id, $code): \Generator
5353
yield delay(self::LATENCY_TIMEOUT);
5454
}
5555

56+
/**
57+
* @psalm-suppress PossiblyInvalidArgument
58+
* @phpstan-ignore generator.valueType
59+
*/
5660
yield call($code);
5761
}
5862
finally

0 commit comments

Comments
 (0)