From 48bf285f9b535322b730dd41727a0783185ba542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Thu, 30 Nov 2023 10:09:35 +0100 Subject: [PATCH] feat: Add support for Symfony7 (#1156) --------- Co-authored-by: Jeroen van den Enden --- .github/workflows/ci.yaml | 4 ++++ composer.json | 14 +++++++------- .../SymfonyPropertyAccessorHydratorTest.php | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 39eb0f24..95705531 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,10 @@ jobs: symfony-versions: - false - '6.4.*' + - '7.*.*' + exclude: + - php: '8.1' + symfony-versions: '7.*.*' name: PHP ${{ matrix.php }} ${{ matrix.description }} - ${{ matrix.symfony-versions }} steps: diff --git a/composer.json b/composer.json index 762e7380..7f0ddd5b 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "fakerphp/faker": "^1.10", "myclabs/deep-copy": "^1.10", "sebastian/comparator": "^3.0 || ^4.0 || ^5.0", - "symfony/property-access": "^6.4", + "symfony/property-access": "^6.4 || ^7.0", "symfony/yaml": "^5.4 || ^6.0" }, "require-dev": { @@ -32,12 +32,12 @@ "phpspec/prophecy": "^1.6", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.3", - "symfony/config": "^6.4", - "symfony/dependency-injection": "^6.4", - "symfony/finder": "^6.4", - "symfony/http-kernel": "^6.4", - "symfony/phpunit-bridge": "^6.4", - "symfony/var-dumper": "^6.4" + "symfony/config": "^6.4 || ^7.0", + "symfony/dependency-injection": "^6.4 || ^7.0", + "symfony/finder": "^6.4 || ^7.0", + "symfony/http-kernel": "^6.4 || ^7.0", + "symfony/phpunit-bridge": "^6.4 || ^7.0", + "symfony/var-dumper": "^6.4 || ^7.0" }, "conflict": { "symfony/framework-bundle": "<6.4.0" diff --git a/tests/Generator/Hydrator/Property/SymfonyPropertyAccessorHydratorTest.php b/tests/Generator/Hydrator/Property/SymfonyPropertyAccessorHydratorTest.php index f3121838..73ef528a 100644 --- a/tests/Generator/Hydrator/Property/SymfonyPropertyAccessorHydratorTest.php +++ b/tests/Generator/Hydrator/Property/SymfonyPropertyAccessorHydratorTest.php @@ -76,7 +76,7 @@ public function testReturnsHydratedObject(): void $object = new SimpleObject('dummy', $instance); $accessorProphecy = $this->prophesize(PropertyAccessorInterface::class); - $accessorProphecy->setValue($instance, 'username', 'bob')->willReturn(null); + $accessorProphecy->setValue($instance, 'username', 'bob')->shouldBeCalled(); /** @var PropertyAccessorInterface $accessor */ $accessor = $accessorProphecy->reveal();