From 1286edb8e14091ca17bbd1c8b51ea67140b26823 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:11:05 +0000 Subject: [PATCH 1/6] Initial plan From 512fc4917728a7bc9ef70ab7bd73cf20f2d949c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:14:27 +0000 Subject: [PATCH 2/6] Skip HEIF test when Imagick codec not available --- tests/Model/Traits/ImageTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Model/Traits/ImageTest.php b/tests/Model/Traits/ImageTest.php index 2e92958..8fcfdcc 100644 --- a/tests/Model/Traits/ImageTest.php +++ b/tests/Model/Traits/ImageTest.php @@ -53,6 +53,7 @@ public function testDimension(): void #[DataProvider('providerSetFile')] public function testSetFile(string $filename, int $width, int $height, bool $isSvg = false): void { + $this->requireImagickCanProcess($filename); $this->createDefaultFelixContainer(); $file = $this->createFileToUpload($filename); @@ -77,6 +78,16 @@ public static function providerSetFile(): iterable yield 'huge webp is resized' => ['huge.webp', 3500, 19]; } + private function requireImagickCanProcess(string $filename): void + { + try { + $im = new \Imagick("tests/data/images/$filename"); + $im->clear(); + } catch (\ImagickException $e) { + self::markTestSkipped('Imagick cannot process this format: ' . $e->getMessage()); + } + } + private function createImage(): \Ecodev\Felix\Model\Image { return new class() implements \Ecodev\Felix\Model\Image { From 8e4b437074f3b04d8bec567fc7c6f72e063d2921 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:19:53 +0000 Subject: [PATCH 3/6] Fix CI environment for HEIF support on PHP 8.4 --- .github/workflows/main.yml | 11 +++++++++++ tests/Model/Traits/ImageTest.php | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 84ee4c8..eb116fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,17 @@ jobs: - name: Install dependencies run: composer install + - name: Install HEIF codecs for ImageMagick + run: | + sudo apt-get update + sudo apt-get install -y libheif1 libde265-0 imagemagick + if apt-cache show libheif-plugin-libde265 >/dev/null 2>&1; then + sudo apt-get install -y libheif-plugin-libde265 + fi + if apt-cache show libheif-plugin-x265 >/dev/null 2>&1; then + sudo apt-get install -y libheif-plugin-x265 + fi + - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" diff --git a/tests/Model/Traits/ImageTest.php b/tests/Model/Traits/ImageTest.php index 8fcfdcc..2e92958 100644 --- a/tests/Model/Traits/ImageTest.php +++ b/tests/Model/Traits/ImageTest.php @@ -53,7 +53,6 @@ public function testDimension(): void #[DataProvider('providerSetFile')] public function testSetFile(string $filename, int $width, int $height, bool $isSvg = false): void { - $this->requireImagickCanProcess($filename); $this->createDefaultFelixContainer(); $file = $this->createFileToUpload($filename); @@ -78,16 +77,6 @@ public static function providerSetFile(): iterable yield 'huge webp is resized' => ['huge.webp', 3500, 19]; } - private function requireImagickCanProcess(string $filename): void - { - try { - $im = new \Imagick("tests/data/images/$filename"); - $im->clear(); - } catch (\ImagickException $e) { - self::markTestSkipped('Imagick cannot process this format: ' . $e->getMessage()); - } - } - private function createImage(): \Ecodev\Felix\Model\Image { return new class() implements \Ecodev\Felix\Model\Image { From 8cc0bd0f7839935088778d8eb61b72a63253f453 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:25:47 +0000 Subject: [PATCH 4/6] Simplify HEIF codec install in CI --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb116fb..46a13f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,13 +39,7 @@ jobs: - name: Install HEIF codecs for ImageMagick run: | sudo apt-get update - sudo apt-get install -y libheif1 libde265-0 imagemagick - if apt-cache show libheif-plugin-libde265 >/dev/null 2>&1; then - sudo apt-get install -y libheif-plugin-libde265 - fi - if apt-cache show libheif-plugin-x265 >/dev/null 2>&1; then - sudo apt-get install -y libheif-plugin-x265 - fi + sudo apt-get install -y libheif-plugin-libde265 - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" From 785f46590562fd34835c824cfb55028de87d684f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:31:32 +0000 Subject: [PATCH 5/6] Refine HEIF codec install step --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46a13f1..2729fae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,9 +37,7 @@ jobs: run: composer install - name: Install HEIF codecs for ImageMagick - run: | - sudo apt-get update - sudo apt-get install -y libheif-plugin-libde265 + run: sudo apt-get install -y --no-install-recommends libheif-plugin-libde265 - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" From 4230f67bb3dd05341415162b59901bae35f0793f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 23:39:18 +0000 Subject: [PATCH 6/6] Restore apt update for HEIF codec install --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2729fae..46a13f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,9 @@ jobs: run: composer install - name: Install HEIF codecs for ImageMagick - run: sudo apt-get install -y --no-install-recommends libheif-plugin-libde265 + run: | + sudo apt-get update + sudo apt-get install -y libheif-plugin-libde265 - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"