Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:
jobs:
cs-fix:
name: Run code style check
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
strategy:
matrix:
php:
- '8.0'
- '8.3'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -26,9 +26,9 @@ jobs:
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- uses: "ramsey/composer-install@v1"
- uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
dependency-versions: highest

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr
Expand All @@ -38,19 +38,17 @@ jobs:

tests:
name: Unit tests
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.3'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -60,9 +58,9 @@ jobs:
extensions: pdo_sqlite, gd
tools: cs2pr

- uses: "ramsey/composer-install@v1"
- uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
dependency-versions: highest

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@
}
},
"require": {
"php": "^7.4 || ^8.0",
"php": " >=8.3",
"ibexa/core": "~5.0.x-dev",
"symfony/dependency-injection": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/http-foundation": "^5.0",
"pagerfanta/pagerfanta": "^2.1",
"symfony/config": "^5.0",
"symfony/form": "^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/event-dispatcher": "^5.0",
"pagerfanta/pagerfanta": "^2.1",
"symfony/form": "^5.0",
"symfony/http-foundation": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/serializer": "^5.4"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"friendsofphp/php-cs-fixer": "^3.0",
"ibexa/code-style": "^1.0",
"ibexa/doctrine-schema": "~5.0.x-dev",
"matthiasnoback/symfony-dependency-injection-test": "^4.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-symfony": "^1.3",
"matthiasnoback/symfony-dependency-injection-test": "^4.3"
"phpunit/phpunit": "^9.6"
},
"scripts": {
"fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php --show-progress=dots",
Expand All @@ -59,6 +59,7 @@
}
},
"config": {
"allow-plugins": false
"allow-plugins": false,
"sort-packages": true
}
}
8 changes: 5 additions & 3 deletions src/lib/Mapper/PagerSearchContentToDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ protected function getContributor(ContentInfo $contentInfo): ?User
protected function setTranslatedContentTypesNames(array &$data, array $contentTypeIds): void
{
// load list of content types with proper translated names
$contentTypes = $this->contentTypeService->loadContentTypeList(
array_unique($contentTypeIds),
$this->userLanguagePreferenceProvider->getPreferredLanguages()
$contentTypes = iterator_to_array(
$this->contentTypeService->loadContentTypeList(
array_unique($contentTypeIds),
$this->userLanguagePreferenceProvider->getPreferredLanguages()
)
);

foreach ($data as $idx => $item) {
Expand Down