From 94e743c87e193f27e189a6d6a7abd2abc025de94 Mon Sep 17 00:00:00 2001 From: Jeroen Thora Date: Fri, 16 Jun 2023 15:24:40 +0200 Subject: [PATCH] [AllBundles] Enable CI testing on php 8.2 --- .github/workflows/ci.yml | 6 +++--- .../AdminBundle/Tests/Helper/FormWidgets/ListWidgetTest.php | 4 +--- .../Tests/Service/Translator/LoaderTest.php | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0325ed73c..10b45e210c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,17 +14,17 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.0', '8.1'] + php: ['8.0', '8.1', '8.2'] deps: ['stable'] symfony: [''] # Don't lock to a specific symfony version by default include: # Test lowest dependencies - deps: 'lowest' - php: 8.0 + php: '8.0' # Test latest php with LTS versions. - deps: 'lts' - php: 8.1 + php: '8.2' symfony: '^5.4' steps: diff --git a/src/Kunstmaan/AdminBundle/Tests/Helper/FormWidgets/ListWidgetTest.php b/src/Kunstmaan/AdminBundle/Tests/Helper/FormWidgets/ListWidgetTest.php index 605dbec518..40865d00e4 100644 --- a/src/Kunstmaan/AdminBundle/Tests/Helper/FormWidgets/ListWidgetTest.php +++ b/src/Kunstmaan/AdminBundle/Tests/Helper/FormWidgets/ListWidgetTest.php @@ -14,10 +14,8 @@ class ListWidgetTest extends TestCase { public function testWidget() { - $views = new \ArrayIterator(); - $views->vars = ['errors' => [new FormError('bang')]]; $view = new FakeView(); - $view->offsetSet('a', $views); + $view->offsetSet('a', ['vars' => ['errors' => [new FormError('bang')]]]); $widget = $this->createMock(FormWidget::class); $builder = $this->createMock(FormBuilder::class); diff --git a/src/Kunstmaan/TranslatorBundle/Tests/Service/Translator/LoaderTest.php b/src/Kunstmaan/TranslatorBundle/Tests/Service/Translator/LoaderTest.php index 9e04f95055..bd8d4db515 100644 --- a/src/Kunstmaan/TranslatorBundle/Tests/Service/Translator/LoaderTest.php +++ b/src/Kunstmaan/TranslatorBundle/Tests/Service/Translator/LoaderTest.php @@ -13,6 +13,7 @@ class LoaderTest extends TestCase const TEST_DATA_LOCALE = 'en'; const TEST_DATA_KEYWORD = 'validation.ok'; const TEST_DATA_TEXT = 'Everything ok'; + private Loader $loader; public function setUp(): void { @@ -27,7 +28,6 @@ public function setUp(): void $translationRepository = $this->createMock(TranslationRepository::class); $translationRepository->method('findBy')->willReturn([$translation]); - /* @var Loader loader */ $this->loader = new Loader(); $this->loader->setTranslationRepository($translationRepository); }