Skip to content

Commit

Permalink
Merge branch '4.4' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p committed Feb 22, 2023
2 parents 4fb1657 + 52361fd commit e82f7c2
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 68 deletions.
16 changes: 8 additions & 8 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'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

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

strategy:
Expand All @@ -47,7 +47,7 @@ jobs:
- '8.1'

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

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

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

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
solr-integration:
name: "Integration tests"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: false
matrix:
Expand All @@ -34,17 +34,17 @@ jobs:
name: "Set up single core"
run: echo "SOLR_CORES=collection1" >> $GITHUB_ENV

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

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

- name: Init Solr
run: ./.github/init_solr.sh
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,8 @@
"allow-plugins": {
"*": false
}
},
"config": {
"allow-plugins": false
}
}
40 changes: 0 additions & 40 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -770,11 +770,6 @@ parameters:
count: 2
path: src/lib/Handler.php

-
message: "#^Ternary operator condition is always true\\.$#"
count: 3
path: src/lib/Handler.php

-
message: "#^Method Ibexa\\\\Solr\\\\Indexer\\:\\:purge\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -1015,11 +1010,6 @@ parameters:
count: 1
path: src/lib/Query/Common/CriterionVisitor/LogicalAnd.php

-
message: "#^Strict comparison using \\=\\=\\= between \\*NEVER\\* and 1 will always evaluate to false\\.$#"
count: 1
path: src/lib/Query/Common/CriterionVisitor/LogicalAnd.php

-
message: "#^Cannot call method visit\\(\\) on Ibexa\\\\Contracts\\\\Solr\\\\Query\\\\CriterionVisitor\\|null\\.$#"
count: 1
Expand All @@ -1035,11 +1025,6 @@ parameters:
count: 1
path: src/lib/Query/Common/CriterionVisitor/LogicalOr.php

-
message: "#^Strict comparison using \\=\\=\\= between \\*NEVER\\* and 1 will always evaluate to false\\.$#"
count: 1
path: src/lib/Query/Common/CriterionVisitor/LogicalOr.php

-
message: "#^Method Ibexa\\\\Solr\\\\Query\\\\Common\\\\CriterionVisitor\\\\MapLocation\\:\\:getSearchFields\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1205,11 +1190,6 @@ parameters:
count: 1
path: src/lib/Query/Common/SortClauseVisitor/Field.php

-
message: "#^Strict comparison using \\=\\=\\= between array and null will always evaluate to false\\.$#"
count: 1
path: src/lib/Query/Common/SortClauseVisitor/Field.php

-
message: "#^Method Ibexa\\\\Solr\\\\Query\\\\Common\\\\SortClauseVisitor\\\\MapLocationDistance\\:\\:getSortFieldName\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1225,11 +1205,6 @@ parameters:
count: 1
path: src/lib/Query/Common/SortClauseVisitor/MapLocationDistance.php

-
message: "#^Strict comparison using \\=\\=\\= between array and null will always evaluate to false\\.$#"
count: 1
path: src/lib/Query/Common/SortClauseVisitor/MapLocationDistance.php

-
message: "#^Argument of an invalid type array\\<int\\|string\\>\\|bool\\|int\\|string supplied for foreach, only iterables are supported\\.$#"
count: 1
Expand Down Expand Up @@ -1710,11 +1685,6 @@ parameters:
count: 1
path: tests/bundle/DependencyInjection/IbexaSolrExtensionExtensionTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Solr\\\\DependencyInjection\\\\IbexaSolrExtensionExtensionTest\\:\\:getDataForTestHttpClientConfiguration\\(\\) return type has no value type specified in iterable type iterable\\.$#"
count: 1
path: tests/bundle/DependencyInjection/IbexaSolrExtensionExtensionTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Solr\\\\DependencyInjection\\\\IbexaSolrExtensionExtensionTest\\:\\:getMinimalConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1785,16 +1755,6 @@ parameters:
count: 1
path: tests/bundle/DependencyInjection/IbexaSolrExtensionExtensionTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Solr\\\\DependencyInjection\\\\IbexaSolrExtensionExtensionTest\\:\\:testHttpClientConfiguration\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#"
count: 1
path: tests/bundle/DependencyInjection/IbexaSolrExtensionExtensionTest.php

-
message: "#^PHPDoc tag @param references unknown parameter\\: \\$httpClientConfig$#"
count: 1
path: tests/bundle/DependencyInjection/IbexaSolrExtensionExtensionTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Solr\\\\Gateway\\\\UpdateSerializer\\\\JsonUpdateSerializerTest\\:\\:getDataForTestSerialize\\(\\) return type has no value type specified in iterable type iterable\\.$#"
count: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ public function testBoostFactorMap(array $configuration, array $map)
/**
* @dataProvider getDataForTestHttpClientConfiguration
*
* @phpstan-param SolrHttpClientConfigArray $httpClientConfig
* @phpstan-param SolrHttpClientConfigArray $config
*/
public function testHttpClientConfiguration(array $config): void
{
Expand All @@ -675,6 +675,9 @@ public function testHttpClientConfiguration(array $config): void
);
}

/**
* @return iterable<string, array<SolrHttpClientConfigArray>>
*/
public function getDataForTestHttpClientConfiguration(): iterable
{
yield 'default values' => [
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/Resources/config/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core0
Expand All @@ -45,7 +45,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core1
Expand All @@ -57,7 +57,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core2
Expand All @@ -69,7 +69,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core3
Expand Down
12 changes: 6 additions & 6 deletions tests/lib/Resources/config/multicore_dedicated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core0
Expand All @@ -44,7 +44,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core1
Expand All @@ -56,7 +56,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core2
Expand All @@ -68,7 +68,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core3
Expand All @@ -80,7 +80,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core4
Expand All @@ -92,7 +92,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core5
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/Resources/config/multicore_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core0
Expand All @@ -39,7 +39,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core1
Expand All @@ -51,7 +51,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core2
Expand All @@ -63,7 +63,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: core3
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Resources/config/single_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
arguments:
-
scheme: http
host: localhost
host: '%test.ibexa.solr.host%'
port: 8983
path: /solr
core: collection1
Expand Down
2 changes: 2 additions & 0 deletions tests/lib/SetupFactory/LegacySetupFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ protected function externalBuildContainer(ContainerBuilder $containerBuilder): v

protected function loadSolrSettings(ContainerBuilder $containerBuilder): void
{
$containerBuilder->setParameter('test.ibexa.solr.host', getenv('SOLR_HOST') ?: 'localhost');

$settingsPath = realpath(__DIR__ . '/../../../src/lib/Resources/config/container/');
$testSettingsPath = realpath(__DIR__ . '/../Resources/config/');

Expand Down

0 comments on commit e82f7c2

Please sign in to comment.