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
33 changes: 23 additions & 10 deletions .github/workflows/backend-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-22.04"
runs-on: "ubuntu-24.04"
strategy:
matrix:
php:
- '8.3'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -35,21 +35,34 @@ jobs:

deptrac:
name: Deptrac
runs-on: ubuntu-latest
runs-on: "ubuntu-24.04"
steps:
- uses: actions/checkout@v4
- name: Deptrac
uses: smoench/deptrac-action@master
- uses: actions/checkout@v5

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr

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

- name: Run deptrac
run: composer run-script deptrac

rector:
name: Run rector
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-24.04"
strategy:
matrix:
php:
- '8.3'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -68,7 +81,7 @@ jobs:

tests:
name: Tests
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-24.04"
timeout-minutes: 10

strategy:
Expand All @@ -78,7 +91,7 @@ jobs:
- '8.3'

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

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/browser-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ jobs:
with:
project-edition: 'oss'
test-suite: '--profile=browser --suite=core-search --config=vendor/ibexa/core-search/behat_suites.yaml'
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
secrets: inherit
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"symfony/yaml": "^7.3"
},
"require-dev": {
"deptrac/deptrac": "^4.2",
"ibexa/behat": "~5.0.x-dev",
"ibexa/code-style": "~2.0.0",
"ibexa/doctrine-schema": "~5.0.x-dev",
"ibexa/rector": "~5.0.x-dev",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^9.0",
"qossmic/deptrac-shim": "^0.24.0 || ^1.0.2"
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
Expand All @@ -45,7 +45,7 @@
"check-cs": "@fix-cs --dry-run",
"test": "phpunit -c phpunit.xml.dist",
"phpstan": "phpstan analyse -c phpstan.neon",
"deptrac": "php vendor/bin/deptrac analyse"
"deptrac": "deptrac analyse"
},
"scripts-descriptions": {
"fix-cs": "Automatically fixes code style in all files",
Expand Down
24 changes: 0 additions & 24 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,3 @@ parameters:
identifier: instanceof.alwaysTrue
count: 1
path: src/contracts/Persistence/CriterionMapper/AbstractFieldCriterionMapper.php

-
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalAndCriterionMapper\:\:getType\(\) never returns ''NOT'' so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/lib/CriterionMapper/LogicalAndCriterionMapper.php

-
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalAndCriterionMapper\:\:getType\(\) never returns ''OR'' so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/lib/CriterionMapper/LogicalAndCriterionMapper.php

-
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalOrCriterionMapper\:\:getType\(\) never returns ''AND'' so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/lib/CriterionMapper/LogicalOrCriterionMapper.php

-
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalOrCriterionMapper\:\:getType\(\) never returns ''NOT'' so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/lib/CriterionMapper/LogicalOrCriterionMapper.php
2 changes: 1 addition & 1 deletion src/contracts/Values/Query/AbstractCriterionQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @template TSortClause of \Ibexa\Contracts\CoreSearch\Values\Query\AbstractSortClause
* @template TCriterion of \Ibexa\Contracts\CoreSearch\Values\Query\Criterion\CriterionInterface
*/
abstract class AbstractCriterionQuery
abstract class AbstractCriterionQuery implements PaginationAwareInterface
{
public const int DEFAULT_LIMIT = 25;

Expand Down
16 changes: 16 additions & 0 deletions src/contracts/Values/Query/PaginationAwareInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace Ibexa\Contracts\CoreSearch\Values\Query;

interface PaginationAwareInterface
{
public function getOffset(): int;

public function getLimit(): ?int;
}
Loading