Skip to content

Commit ff48679

Browse files
Add compatibility to symfony 7 (#6)
1 parent ac66643 commit ff48679

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

composer.json

+14-15
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,20 @@
99
"doctrine/doctrine-bundle": "^2.5",
1010
"doctrine/orm": "^2.11",
1111
"psr/container": "^1.0 || ^2.0",
12-
"symfony/config": "^5.4 || ^6.0",
13-
"symfony/dependency-injection": "^5.4 || ^6.0",
14-
"symfony/doctrine-bridge": "^5.4 || ^6.0",
15-
"symfony/framework-bundle": "^5.4 || ^6.0",
16-
"symfony/http-kernel": "^5.4 || ^6.0",
17-
"symfony/lock": "^5.4 || ^6.0",
18-
"symfony/messenger": "^5.4 || ^6.0",
12+
"symfony/config": "^5.4 || ^6.0 || ^7.0",
13+
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
14+
"symfony/doctrine-bridge": "^5.4 || ^6.0 || ^7.0",
15+
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
16+
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
17+
"symfony/lock": "^5.4 || ^6.0 || ^7.0",
18+
"symfony/messenger": "^5.4 || ^6.0 || ^7.0",
1919
"symfony/service-contracts": "^1.0 || ^2.0 || ^3.0"
2020
},
2121
"require-dev": {
2222
"coduo/php-matcher": "^6.0",
2323
"friendsofphp/php-cs-fixer": "^3.6",
2424
"handcraftedinthealps/code-coverage-checker": "^0.2.5",
2525
"jangregor/phpstan-prophecy": "^1.0",
26-
"nunomaduro/collision": "^5.0 || ^6.0",
2726
"phpspec/prophecy-phpunit": "^2.0",
2827
"phpstan/extension-installer": "^1.1",
2928
"phpstan/phpstan": "^1.4",
@@ -35,13 +34,13 @@
3534
"qossmic/deptrac-shim": "^0.24.0 || ^1.0",
3635
"rector/rector": "^0.15.0",
3736
"schranz/test-generator": "^0.4",
38-
"symfony/browser-kit": "^5.4 || ^6.0",
39-
"symfony/css-selector": "^5.4 || ^6.0",
40-
"symfony/debug-bundle": "^5.4 || ^6.0",
41-
"symfony/dotenv": "^5.4 || ^6.0",
42-
"symfony/error-handler": "^5.4 || ^6.0",
43-
"symfony/phpunit-bridge": "^5.4 || ^6.0",
44-
"symfony/yaml": "^5.4 || ^6.0",
37+
"symfony/browser-kit": "^5.4 || ^6.0 || ^7.0",
38+
"symfony/css-selector": "^5.4 || ^6.0 || ^7.0",
39+
"symfony/debug-bundle": "^5.4 || ^6.0 || ^7.0",
40+
"symfony/dotenv": "^5.4 || ^6.0 || ^7.0",
41+
"symfony/error-handler": "^5.4 || ^6.0 || ^7.0",
42+
"symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0",
43+
"symfony/yaml": "^5.4 || ^6.0 || ^7.0",
4544
"thecodingmachine/phpstan-strict-rules": "^1.0"
4645
},
4746
"autoload": {

phpunit.xml.dist

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
backupGlobals="false"
77
colors="true"
88
bootstrap="tests/bootstrap.php"
9-
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"
109
forceCoversAnnotation="true"
1110
>
1211
<php>

tests/Traits/PrivatePropertyTrait.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Sulu\Messenger\Tests\Traits;
66

7-
use ReflectionException;
8-
97
trait PrivatePropertyTrait
108
{
119
/**
@@ -26,7 +24,7 @@ protected static function setPrivateProperty(object $object, string $propertyNam
2624
try {
2725
$propertyReflection = $reflection->getProperty($propertyName);
2826
self::setValue($propertyReflection, $object, $value);
29-
} catch (ReflectionException) {
27+
} catch (\ReflectionException) {
3028
$parent = $reflection->getParentClass();
3129
if ($parent) {
3230
$propertyReflection = $parent->getProperty($propertyName);

tests/Unit/Infrastructure/Symfony/Messenger/LockMiddleware/LockMiddlewareTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Sulu\Messenger\Infrastructure\Symfony\Messenger\LockMiddleware\LockStamp;
1313
use Symfony\Component\DependencyInjection\Container;
1414
use Symfony\Component\Lock\LockFactory;
15-
use Symfony\Component\Lock\LockInterface;
15+
use Symfony\Component\Lock\SharedLockInterface;
1616
use Symfony\Component\Messenger\Envelope;
1717
use Symfony\Component\Messenger\Middleware\StackMiddleware;
1818

@@ -61,7 +61,7 @@ public function testHandleWithStamp(): void
6161
$envelope = $envelope->with(new LockStamp('test', 30, true));
6262
$stack = $this->createStack();
6363

64-
$lock = $this->prophesize(LockInterface::class);
64+
$lock = $this->prophesize(SharedLockInterface::class);
6565
$lock->acquire(true)
6666
->shouldBeCalled();
6767
$lock->release()

0 commit comments

Comments
 (0)