Skip to content

Commit 27d7fd3

Browse files
author
Stepan Zolotarev
committed
Update dependencies
1 parent 378d190 commit 27d7fd3

File tree

7 files changed

+39
-56
lines changed

7 files changed

+39
-56
lines changed

composer.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,27 @@
2727
}
2828
},
2929
"require": {
30-
"php": ">=8.1",
31-
"php-service-bus/common": "v5.1.*"
30+
"php": ">=8.2",
31+
"php-service-bus/common": "v5.2.x-dev"
3232
},
3333
"require-dev": {
3434
"ext-iconv": "*",
35-
"php-service-bus/code-style-config": "v5.1.*",
36-
"symfony/dependency-injection": "v6.0.*",
37-
"phpunit/phpunit": "v9.5.*",
38-
"vimeo/psalm": "v4.22.*",
39-
"phpstan/phpstan": "v1.5.*",
40-
"boesing/psalm-plugin-stringf": "v1.1.*"
35+
"symfony/dependency-injection": "^6.3 || ^7.0",
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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
parameters:
2-
checkMissingIterableValueType: false
3-
checkGenericClassInNonGenericObjectType: false
2+
level: 9
3+
ignoreErrors:
4+
- identifier: missingType.iterableValue

phpunit.xml

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
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-
<testsuite name="PHP Service Bus: Argument resolver component">
30-
<directory>./tests/</directory>
31-
</testsuite>
32-
</testsuites>
33-
</phpunit>
10+
beStrictAboutOutputDuringTests="true">
11+
<php>
12+
<ini name="error_reporting" value="-1"/>
13+
</php>
14+
<testsuites>
15+
<testsuite name="PHP Service Bus: Argument resolver component">
16+
<directory>./tests/</directory>
17+
</testsuite>
18+
</testsuites>
19+
<source>
20+
<include>
21+
<directory>./src</directory>
22+
</include>
23+
<exclude>
24+
<directory>./tests</directory>
25+
</exclude>
26+
</source>
27+
</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/ArgumentResolverModule.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ final class ArgumentResolverModule implements ServiceBusModule
2222
{
2323
public function boot(ContainerBuilder $containerBuilder): void
2424
{
25-
if ($containerBuilder->hasDefinition('service_bus.services_locator') === false)
26-
{
25+
if ($containerBuilder->hasDefinition('service_bus.services_locator') === false) {
2726
$definition = (new Definition(ServiceLocator::class, [[]]))->setPublic(true);
2827

2928
$containerBuilder->addDefinitions(['service_bus.services_locator' => $definition]);

src/ChainArgumentResolver.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ public function resolve(\SplObjectStorage $arguments, object $message, ServiceBu
3838
$preparedArguments = [];
3939

4040
/** @var MessageHandlerArgument $argument */
41-
foreach ($arguments as $argument)
42-
{
43-
foreach ($this->resolvers as $argumentResolver)
44-
{
45-
if ($argumentResolver->supports($argument))
46-
{
41+
foreach ($arguments as $argument) {
42+
foreach ($this->resolvers as $argumentResolver) {
43+
if ($argumentResolver->supports($argument)) {
4744
$preparedArguments[] = $argumentResolver->resolve(
4845
message: $message,
4946
context: $context,

src/ContainerArgumentResolver.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ public function supports(MessageHandlerArgument $argument): bool
3535

3636
public function resolve(object $message, ServiceBusContext $context, MessageHandlerArgument $argument): object
3737
{
38-
/**
39-
* @noinspection PhpUnnecessaryLocalVariableInspection
40-
*
41-
* @var object $object
42-
*/
38+
/** @var object $object */
4339
$object = $this->serviceLocator->get((string) $argument->typeClass);
4440

4541
return $object;

0 commit comments

Comments
 (0)