Skip to content

Commit 0452ae4

Browse files
author
Stepan Zolotarev
committed
Update dependencies
1 parent cabd8a7 commit 0452ae4

14 files changed

+193
-131
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

+15-16
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,32 @@
3434
]
3535
},
3636
"require": {
37-
"php": ">=8.1",
37+
"php": ">=8.2",
3838
"ext-json": "*",
3939
"ext-iconv": "*",
40-
"php-service-bus/common": "v5.1.*",
41-
"doctrine/annotations": "v1.13.*",
42-
"phpdocumentor/reflection-docblock": "v5.3.*",
43-
"symfony/property-access": "v6.0.*",
44-
"symfony/property-info": "v6.0.*",
45-
"symfony/serializer": "v6.0.*"
40+
"php-service-bus/common": "v5.2.x-dev",
41+
"doctrine/annotations": "^1.13 || ^2.0",
42+
"phpdocumentor/reflection-docblock": "^5.5",
43+
"symfony/property-access": "^6.3 || ^7.0",
44+
"symfony/property-info": "^6.3 || ^7.0",
45+
"symfony/serializer": "^6.3 || ^7.0"
4646
},
4747
"require-dev": {
48-
"php-service-bus/code-style-config": "v5.1.*",
49-
"phpunit/phpunit": "v9.5.*",
50-
"vimeo/psalm": "v4.22.*",
51-
"phpstan/phpstan": "v1.5.*",
52-
"boesing/psalm-plugin-stringf": "v1.1.*"
48+
"php-service-bus/code-style-config": "v5.2.x-dev",
49+
"phpunit/phpunit": "^10.0 || ^11.0",
50+
"vimeo/psalm": "^4.30 || ^5.4",
51+
"phpstan/phpstan": "^1.12 || ^2.0"
5352
},
5453
"prefer-stable": true,
5554
"minimum-stability": "stable",
5655
"scripts": {
5756
"psalm": "rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml",
58-
"phpstan": "./vendor/bin/phpstan analyse src --level 9",
59-
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose --debug",
60-
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose --debug",
57+
"phpstan": "./vendor/bin/phpstan analyse src",
58+
"tests": "./vendor/bin/phpunit --configuration phpunit.xml",
59+
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage",
6160
"cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
6261
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes",
63-
"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"
62+
"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"
6463
},
6564
"config": {
6665
"optimize-autoloader": true,

phpstan.neon

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
parameters:
2-
checkMissingIterableValueType: false
3-
checkGenericClassInNonGenericObjectType: false
2+
level: 9
3+
ignoreErrors:
4+
- identifier: missingType.iterableValue
5+
- identifier: missingType.generics

phpunit.xml

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

psalm.xml

+1-4
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/Symfony/Extensions/EmptyDataNormalizer.php

+18-11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
1616
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
17+
1718
use function ServiceBus\Common\createWithoutConstructor;
1819

1920
/**
@@ -26,26 +27,23 @@ final class EmptyDataNormalizer implements NormalizerInterface, DenormalizerInte
2627
*/
2728
private $localStorage = [];
2829

29-
public function normalize($object, string $format = null, array $context = []): array
30+
public function normalize(mixed $data, string $format = null, array $context = []): array
3031
{
3132
return [];
3233
}
3334

3435
/**
3536
* @throws \ReflectionException
3637
*/
37-
public function supportsNormalization($data, string $format = null): bool
38+
public function supportsNormalization($data, string $format = null, array $context = []): bool
3839
{
39-
if (\is_object($data))
40-
{
40+
if (\is_object($data)) {
4141
$class = \get_class($data);
4242

43-
if (isset($this->localStorage[$class]) === false)
44-
{
43+
if (isset($this->localStorage[$class]) === false) {
4544
$this->localStorage[$class] = \array_map(
46-
static function (\ReflectionProperty $property): string
47-
{
48-
return (string) $property->name;
45+
static function (\ReflectionProperty $property): string {
46+
return $property->name;
4947
},
5048
(new \ReflectionClass($data))->getProperties()
5149
);
@@ -63,12 +61,21 @@ static function (\ReflectionProperty $property): string
6361
public function denormalize($data, string $type, string $format = null, array $context = []): object
6462
{
6563
/** @psalm-var class-string $type */
66-
6764
return createWithoutConstructor($type);
6865
}
6966

70-
public function supportsDenormalization($data, string $type, string $format = null): bool
67+
public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool
7168
{
7269
return empty($data);
7370
}
71+
72+
/**
73+
* @psalm-suppress LessSpecificImplementedReturnType
74+
*/
75+
public function getSupportedTypes(?string $format): array
76+
{
77+
return [
78+
'object' => false
79+
];
80+
}
7481
}

src/Symfony/Extensions/PropertyNameConverter.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,17 @@ final class PropertyNameConverter implements NameConverterInterface
2626
*/
2727
private $localStorage = [];
2828

29-
public function normalize(string $propertyName): string
29+
public function normalize(string $propertyName, ?string $class = null, ?string $format = null, array $context = []): string
3030
{
3131
return $propertyName;
3232
}
3333

34-
public function denormalize(string $propertyName): string
34+
public function denormalize(string $propertyName, ?string $class = null, ?string $format = null, array $context = []): string
3535
{
36-
if (isset($this->localStorage[$propertyName]) === false)
37-
{
36+
if (isset($this->localStorage[$propertyName]) === false) {
3837
$joinedString = \preg_replace_callback(
3938
'/_(.?)/',
40-
static function (array $matches): string
41-
{
39+
static function (array $matches): string {
4240
return \ucfirst($matches[1]);
4341
},
4442
$propertyName

0 commit comments

Comments
 (0)