Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/0x-First-Prototype' into 5-Authe…
Browse files Browse the repository at this point in the history
…ntication-Authorization
  • Loading branch information
mattamon committed Mar 1, 2024
2 parents d0f90f0 + 8bd9ef7 commit 1ba235b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/codeception.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions config/serialization/asset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Pimcore\Bundle\StudioApiBundle\Dto\Asset:
attributes:
type:
groups: ['asset:read']
iconName:
groups: [ 'asset:read' ]
children:
groups: ['asset:read']
filename:
Expand Down
2 changes: 1 addition & 1 deletion qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions src/Service/IconService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
};
}

Expand All @@ -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
};
}

Expand All @@ -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
};
}
}

0 comments on commit 1ba235b

Please sign in to comment.