From 2c9c940e006637440f517e514bb0bffaf747d836 Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Thu, 29 Feb 2024 08:25:28 +0100 Subject: [PATCH 1/6] Add icon to serializer --- config/serialization/asset.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/serialization/asset.yaml b/config/serialization/asset.yaml index 398eebd01..245aad6a3 100644 --- a/config/serialization/asset.yaml +++ b/config/serialization/asset.yaml @@ -2,6 +2,8 @@ Pimcore\Bundle\StudioApiBundle\Dto\Asset: attributes: type: groups: ['asset:read'] + iconName: + groups: [ 'asset:read' ] children: groups: ['asset:read'] filename: From 4c15c696f1b7227e6409900d8835827a636faa6a Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:21:05 +0100 Subject: [PATCH 2/6] Add csv icon, fix default icons --- src/Service/IconService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Service/IconService.php b/src/Service/IconService.php index 962dec15e..7af982efb 100644 --- a/src/Service/IconService.php +++ b/src/Service/IconService.php @@ -15,6 +15,8 @@ final class IconService implements IconServiceInterface { + private string $defaultIcon = 'file-question-02'; + public function getIconForAsset(string $assetType, ?string $mimeType): string { if ($assetType === 'document' && $mimeType !== null) { @@ -23,7 +25,7 @@ public function getIconForAsset(string $assetType, ?string $mimeType): string 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'file-x-03', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'file-02', 'application/pdf' => 'file-check-02', - default => 'file' + default => $this->defaultIcon }; } @@ -32,7 +34,8 @@ public function getIconForAsset(string $assetType, ?string $mimeType): string 'application/json' => 'file-code-01', 'application/type9' => 'file-check-02', 'text/plain' => 'file-02', - default => 'file' + 'text/csv' => 'file-x-03', + default => $this->defaultIcon }; } @@ -41,7 +44,7 @@ public function getIconForAsset(string $assetType, ?string $mimeType): string 'image' => 'image-01', 'video' => 'video-recorder', 'audio' => 'volume-max', - default => 'file-question-02' + default => $this->defaultIcon }; } } From f1d7a1eb569ce50b0e1f3e43f92585fd40b14a5e Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:26:26 +0100 Subject: [PATCH 3/6] Update min php version to 8.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 64f43c210..2a0f1a493 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "prefer-stable": true, "minimum-stability": "dev", "require": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.2", "pimcore/static-resolver-bundle": "^1.3", "pimcore/generic-data-index-bundle": "1.x-dev", "pimcore/pimcore": "^11.0", From 719305de2c9ec7c63dc4c6140e05092c7bc939b3 Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:29:23 +0100 Subject: [PATCH 4/6] Update min php version to 8.2 --- .github/workflows/qodana.yml | 2 +- .github/workflows/static-analysis.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml index 6a478ba9f..60ebe65c8 100644 --- a/.github/workflows/qodana.yml +++ b/.github/workflows/qodana.yml @@ -37,7 +37,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 extensions: curl, mbstring, openssl, pdo, pdo_sqlite ini-values: memory_limit=-1, date.timezone='UTC' coverage: xdebug diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 3ca2368c1..99f69f7e6 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -24,7 +24,6 @@ jobs: strategy: matrix: include: - - { php-version: "8.1", dependencies: "lowest", experimental: false } - { php-version: "8.2", dependencies: "highest", experimental: false } - { php-version: "8.2", dependencies: "highest", pimcore_version: "11.x-dev as 11.99.9", experimental: true } steps: From be61c50d4729774a49b5eb0e52ccf88f1707455a Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:41:25 +0100 Subject: [PATCH 5/6] Update min php version to 8.2 --- .github/workflows/codeception.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codeception.yaml b/.github/workflows/codeception.yaml index c78fd4ddb..0fe6f24ee 100644 --- a/.github/workflows/codeception.yaml +++ b/.github/workflows/codeception.yaml @@ -27,8 +27,7 @@ jobs: strategy: matrix: include: - - { php-version: 8.1, dependencies: lowest, pimcore_version: "", experimental: false } - - { php-version: 8.2, dependencies: highest, pimcore_version: "", experimental: false } + - { php-version: 8.2, dependencies: lowest, pimcore_version: "", experimental: false } steps: - name: "Checkout code" From 8bd9ef7227704af8e7695b7ba1e8ab034f00352c Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:43:18 +0100 Subject: [PATCH 6/6] Update min php version to 8.2 --- qodana.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qodana.yaml b/qodana.yaml index 95fff5680..0144c311b 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -3,7 +3,7 @@ linter: jetbrains/qodana-php:latest profile: path: .qodana-profile.xml php: - version: "8.1" + version: "8.2" failThreshold: 0 exclude: - name: All