Skip to content

Commit

Permalink
Add compatibility to symfony 7 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored Nov 30, 2023
1 parent ac66643 commit ff48679
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
29 changes: 14 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@
"doctrine/doctrine-bundle": "^2.5",
"doctrine/orm": "^2.11",
"psr/container": "^1.0 || ^2.0",
"symfony/config": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"symfony/doctrine-bridge": "^5.4 || ^6.0",
"symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"symfony/lock": "^5.4 || ^6.0",
"symfony/messenger": "^5.4 || ^6.0",
"symfony/config": "^5.4 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
"symfony/doctrine-bridge": "^5.4 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
"symfony/lock": "^5.4 || ^6.0 || ^7.0",
"symfony/messenger": "^5.4 || ^6.0 || ^7.0",
"symfony/service-contracts": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"coduo/php-matcher": "^6.0",
"friendsofphp/php-cs-fixer": "^3.6",
"handcraftedinthealps/code-coverage-checker": "^0.2.5",
"jangregor/phpstan-prophecy": "^1.0",
"nunomaduro/collision": "^5.0 || ^6.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.4",
Expand All @@ -35,13 +34,13 @@
"qossmic/deptrac-shim": "^0.24.0 || ^1.0",
"rector/rector": "^0.15.0",
"schranz/test-generator": "^0.4",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/css-selector": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/error-handler": "^5.4 || ^6.0",
"symfony/phpunit-bridge": "^5.4 || ^6.0",
"symfony/yaml": "^5.4 || ^6.0",
"symfony/browser-kit": "^5.4 || ^6.0 || ^7.0",
"symfony/css-selector": "^5.4 || ^6.0 || ^7.0",
"symfony/debug-bundle": "^5.4 || ^6.0 || ^7.0",
"symfony/dotenv": "^5.4 || ^6.0 || ^7.0",
"symfony/error-handler": "^5.4 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0",
"symfony/yaml": "^5.4 || ^6.0 || ^7.0",
"thecodingmachine/phpstan-strict-rules": "^1.0"
},
"autoload": {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"
forceCoversAnnotation="true"
>
<php>
Expand Down
4 changes: 1 addition & 3 deletions tests/Traits/PrivatePropertyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Sulu\Messenger\Tests\Traits;

use ReflectionException;

trait PrivatePropertyTrait
{
/**
Expand All @@ -26,7 +24,7 @@ protected static function setPrivateProperty(object $object, string $propertyNam
try {
$propertyReflection = $reflection->getProperty($propertyName);
self::setValue($propertyReflection, $object, $value);
} catch (ReflectionException) {
} catch (\ReflectionException) {
$parent = $reflection->getParentClass();
if ($parent) {
$propertyReflection = $parent->getProperty($propertyName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Sulu\Messenger\Infrastructure\Symfony\Messenger\LockMiddleware\LockStamp;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\Lock\LockFactory;
use Symfony\Component\Lock\LockInterface;
use Symfony\Component\Lock\SharedLockInterface;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Middleware\StackMiddleware;

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

$lock = $this->prophesize(LockInterface::class);
$lock = $this->prophesize(SharedLockInterface::class);
$lock->acquire(true)
->shouldBeCalled();
$lock->release()
Expand Down

0 comments on commit ff48679

Please sign in to comment.