Skip to content

Commit cca7232

Browse files
author
Stepan Zolotarev
committed
Update dependencies
1 parent ef2d56a commit cca7232

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+250
-272
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

@@ -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

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,34 @@
3030
}
3131
},
3232
"require": {
33-
"php": ">=8.1",
33+
"php": ">=8.2",
3434
"ext-json": "*",
35-
"php-service-bus/common": "v5.1.*",
36-
"php-service-bus/http-client": "v5.1.*",
37-
"php-service-bus/mutex": "v5.1.*",
38-
"php-service-bus/message-serializer": "v5.1.*",
39-
"moneyphp/money": "v4.0.*",
40-
"symfony/validator": "v6.0.*",
41-
"symfony/cache": "v6.0.*",
42-
"doctrine/annotations": "v1.13.*",
43-
"amphp/log": "v1.1.*"
35+
"php-service-bus/common": "v5.2.x-dev",
36+
"php-service-bus/http-client": "v5.2.x-dev",
37+
"php-service-bus/mutex": "v5.2.x-dev",
38+
"php-service-bus/message-serializer": "v5.2.x-dev",
39+
"moneyphp/money": "^v4.4",
40+
"symfony/validator": "^6.3 || ^7.0",
41+
"symfony/cache": "^6.3 || ^7.0",
42+
"doctrine/annotations": "^v1.14",
43+
"amphp/log": "v1.2.*"
4444
},
4545
"require-dev": {
46-
"php-service-bus/code-style-config": "v5.1.*",
47-
"phpunit/phpunit": "v9.5.*",
48-
"vimeo/psalm": "v4.22.*",
49-
"phpstan/phpstan": "v1.5.*",
50-
"boesing/psalm-plugin-stringf": "v1.1.*"
46+
"php-service-bus/code-style-config": "v5.2.x-dev",
47+
"phpunit/phpunit": "^10.0 || ^11.0",
48+
"vimeo/psalm": "^4.30 || ^5.4",
49+
"phpstan/phpstan": "^1.12 || ^2.0"
5150
},
5251
"prefer-stable": true,
5352
"minimum-stability": "stable",
5453
"scripts": {
5554
"psalm": "rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml",
56-
"phpstan": "./vendor/bin/phpstan analyse src --level 9",
57-
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose --debug",
58-
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose --debug",
55+
"phpstan": "./vendor/bin/phpstan analyse src",
56+
"tests": "./vendor/bin/phpunit --configuration phpunit.xml",
57+
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage",
5958
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
6059
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes",
61-
"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"
60+
"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"
6261
},
6362
"config": {
6463
"optimize-autoloader": true,

phpstan.neon

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
2-
checkMissingIterableValueType: false
3-
checkGenericClassInNonGenericObjectType: false
4-
ignoreErrors:
5-
- '#Property .* is never written, only read#'
6-
- '#Property .* is never read, only written#'
2+
level: 9
3+
ignoreErrors:
4+
- identifier: missingType.iterableValue
5+
- identifier: property.onlyRead
6+
- identifier: property.onlyWritten
7+
- identifier: property.readOnlyByPhpDocDefaultValue

phpunit.xml

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,40 @@
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-
31-
<testsuite name="PHP Service Bus: Common component">
32-
<directory>./vendor/php-service-bus/common/tests/</directory>
33-
</testsuite>
34-
35-
<testsuite name="PHP Service Bus: Mutex component">
36-
<directory>./vendor/php-service-bus/mutex/tests/</directory>
37-
</testsuite>
38-
39-
<testsuite name="PHP Service Bus: Http client component">
40-
<directory>./vendor/php-service-bus/http-client/tests/</directory>
41-
</testsuite>
42-
43-
<testsuite name="PHP Service Bus: Message serializer">
44-
<directory>./vendor/php-service-bus/message-serializer/tests/</directory>
45-
</testsuite>
46-
47-
<testsuite name="PHP Service Bus: Telegram component">
48-
<directory>./tests/</directory>
49-
</testsuite>
50-
51-
</testsuites>
52-
</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>./vendor/php-service-bus/common/tests/</directory>
18+
</testsuite>
19+
<testsuite name="PHP Service Bus: Mutex component">
20+
<directory>./vendor/php-service-bus/mutex/tests/</directory>
21+
</testsuite>
22+
<testsuite name="PHP Service Bus: Http client component">
23+
<directory>./vendor/php-service-bus/http-client/tests/</directory>
24+
</testsuite>
25+
<testsuite name="PHP Service Bus: Message serializer">
26+
<directory>./vendor/php-service-bus/message-serializer/tests/</directory>
27+
</testsuite>
28+
<testsuite name="PHP Service Bus: Telegram component">
29+
<directory>./tests/</directory>
30+
</testsuite>
31+
</testsuites>
32+
<source>
33+
<include>
34+
<directory>./src</directory>
35+
</include>
36+
<exclude>
37+
<directory>./tests</directory>
38+
</exclude>
39+
</source>
40+
</phpunit>

psalm.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<psalm
3-
useDocblockTypes="true"
3+
findUnusedCode="false"
44
useDocblockPropertyTypes="true"
55
strictBinaryOperands="true"
66
findUnusedPsalmSuppress="true"
@@ -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/Api/Method/Animation/SendAnimation.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ public static function uploadFile(ChatId $chatId, InputFilePath $file, ?string $
9696
*/
9797
public static function withUploadedFile(ChatId $chatId, string $fileId, ?string $caption = null): self
9898
{
99-
if ($fileId === '')
100-
{
99+
if ($fileId === '') {
101100
throw new \InvalidArgumentException('Audio file_id to send must be specified');
102101
}
103102

@@ -118,8 +117,7 @@ public function uploadThumbFile(InputFilePath $thumb): self
118117

119118
public function useUploadedThumb(string $thumbFileId): self
120119
{
121-
if ($thumbFileId === '')
122-
{
120+
if ($thumbFileId === '') {
123121
throw new \InvalidArgumentException('Thumb file_id must be specified');
124122
}
125123

src/Api/Method/Audio/SendAudio.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ public static function withUploadedFile(
108108
?string $title = null,
109109
?string $caption = null
110110
): self {
111-
if ($fileId === '')
112-
{
111+
if ($fileId === '') {
113112
throw new \InvalidArgumentException('Audio file_id to send must be specified');
114113
}
115114

@@ -148,8 +147,7 @@ public function uploadThumbFile(InputFilePath $thumb): self
148147
*/
149148
public function useUploadedThumb(string $thumbFileId): self
150149
{
151-
if ($thumbFileId === '')
152-
{
150+
if ($thumbFileId === '') {
153151
throw new \InvalidArgumentException('Thumb file_id must be specified');
154152
}
155153

src/Api/Method/Chat/BroadcastType.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ final class BroadcastType implements Enum
5959

6060
public static function create(string $value): static
6161
{
62-
if (\in_array($value, self::LIST, true) === false)
63-
{
62+
if (\in_array($value, self::LIST, true) === false) {
6463
throw new \InvalidArgumentException(\sprintf('Incorrect broadcast type: %s', $value));
6564
}
6665

src/Api/Method/Document/SendDocument.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ public static function uploadFile(ChatId $chatId, InputFilePath $file, ?string $
7373
*/
7474
public static function withUploadedFile(ChatId $chatId, string $fileId, ?string $caption = null): self
7575
{
76-
if ($fileId === '')
77-
{
76+
if ($fileId === '') {
7877
throw new \InvalidArgumentException('Document file_id to send must be specified');
7978
}
8079

@@ -112,8 +111,7 @@ public function uploadThumbFile(InputFilePath $thumb): self
112111
*/
113112
public function useUploadedThumb(string $thumbFileId): self
114113
{
115-
if ($thumbFileId === '')
116-
{
114+
if ($thumbFileId === '') {
117115
throw new \InvalidArgumentException('Thumb file_id must be specified');
118116
}
119117

src/Api/Method/InlineQuery/AnswerInlineQuery.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use ServiceBus\TelegramBot\Api\Type\InlineQueryResult\InlineQueryResult;
1616
use ServiceBus\TelegramBot\Api\Type\SimpleSuccessResponse;
1717
use ServiceBus\TelegramBot\Interaction\TelegramMethod;
18+
1819
use function ServiceBus\Common\jsonEncode;
1920

2021
/**

0 commit comments

Comments
 (0)