Skip to content

Commit bcc842c

Browse files
committed
Merged branch '4.6'
2 parents c7eafb7 + a544f21 commit bcc842c

File tree

6 files changed

+83
-36
lines changed

6 files changed

+83
-36
lines changed

.github/workflows/browser-tests.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup-symfony-cache'
1818
test-setup-phase-2: '--mode=standard --profile=httpCache --suite=setup'
1919
secrets:
20+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
21+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
22+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
2023
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
2124
varnish6:
2225
name: "Varnish 6 integration tests"
@@ -27,6 +30,9 @@ jobs:
2730
test-suite: '--mode=standard --profile=httpCache --suite=varnish6'
2831
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup'
2932
secrets:
33+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
34+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
35+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
3036
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
3137
varnish7:
3238
name: "Varnish 7 integration tests"
@@ -37,6 +43,9 @@ jobs:
3743
test-suite: '--mode=standard --profile=httpCache --suite=varnish7'
3844
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup'
3945
secrets:
46+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
47+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
48+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
4049
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4150
varnish6-translation-aware:
4251
name: "Varnish integration tests (translation-aware)"
@@ -48,6 +57,9 @@ jobs:
4857
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup-translation-aware'
4958
test-setup-phase-2: '--mode=standard --profile=httpCache --suite=setup'
5059
secrets:
60+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
61+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
62+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
5163
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5264
varnish7-translation-aware:
5365
name: "Varnish 7 integration tests (translation-aware)"
@@ -59,6 +71,9 @@ jobs:
5971
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup-translation-aware'
6072
test-setup-phase-2: '--mode=standard --profile=httpCache --suite=setup'
6173
secrets:
74+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
75+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
76+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
6277
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
6378
varnish6-token:
6479
name: "Varnish 6 integration tests with invalidate token"
@@ -70,6 +85,9 @@ jobs:
7085
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup-token'
7186
test-setup-phase-2: '--mode=standard --profile=httpCache --suite=setup'
7287
secrets:
88+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
89+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
90+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
7391
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
7492
varnish7-token:
7593
name: "Varnish 7 integration tests with invalidate token"
@@ -81,4 +99,7 @@ jobs:
8199
test-setup-phase-1: '--mode=standard --profile=httpCache --suite=setup-token'
82100
test-setup-phase-2: '--mode=standard --profile=httpCache --suite=setup'
83101
secrets:
102+
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
103+
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
104+
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
84105
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/ci.yaml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
php:
1717
- '8.3'
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020

2121
- name: Setup PHP Action
2222
uses: shivammathur/setup-php@v2
@@ -41,7 +41,7 @@ jobs:
4141
php:
4242
- '8.3'
4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v5
4545

4646
- name: Setup PHP Action
4747
uses: shivammathur/setup-php@v2
@@ -51,38 +51,13 @@ jobs:
5151
extensions: 'pdo_sqlite, gd'
5252
tools: cs2pr
5353

54-
- uses: "ramsey/composer-install@v3"
54+
- uses: ramsey/composer-install@v3
5555
with:
56-
dependency-versions: "highest"
56+
dependency-versions: highest
5757

5858
- name: Run PHPStan analysis
5959
run: composer run-script phpstan
6060

61-
rector:
62-
name: Run rector
63-
runs-on: "ubuntu-22.04"
64-
strategy:
65-
matrix:
66-
php:
67-
- '8.3'
68-
steps:
69-
- uses: actions/checkout@v4
70-
71-
- name: Setup PHP Action
72-
uses: shivammathur/setup-php@v2
73-
with:
74-
php-version: ${{ matrix.php }}
75-
coverage: none
76-
extensions: 'pdo_sqlite, gd'
77-
tools: cs2pr
78-
79-
- uses: ramsey/composer-install@v3
80-
with:
81-
dependency-versions: highest
82-
83-
- name: Run rector
84-
run: vendor/bin/rector process --dry-run --ansi
85-
8661
tests:
8762
name: Tests
8863
runs-on: "ubuntu-24.04"
@@ -95,7 +70,7 @@ jobs:
9570
- '8.3'
9671

9772
steps:
98-
- uses: actions/checkout@v4
73+
- uses: actions/checkout@v5
9974

10075
- name: Setup PHP Action
10176
uses: shivammathur/setup-php@v2

.github/workflows/rector.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Rector PHP
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
9+
10+
jobs:
11+
rector:
12+
name: Run rector
13+
runs-on: "ubuntu-22.04"
14+
strategy:
15+
matrix:
16+
php:
17+
- '8.3'
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- uses: ibexa/gh-workflows/actions/composer-install@main
22+
with:
23+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
24+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
25+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
26+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
27+
28+
- name: Run rector
29+
run: vendor/bin/rector process --dry-run --ansi

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"authors": [
1010
{
11-
"name": "eZ Systems",
11+
"name": "Ibexa",
1212
"email": "[email protected]"
1313
}
1414
],

spec/ResponseTagger/Value/ContentInfoTaggerSpec.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ public function it_ignores_non_content_info(ResponseTagger $tagHandler): void
3636

3737
public function it_tags_with_content_and_content_type_id(ResponseTagger $tagHandler): void
3838
{
39-
$value = new ContentInfo(['id' => 123, 'contentTypeId' => 987]);
39+
$value = new ContentInfo([
40+
'id' => 123,
41+
'mainLocationId' => 456,
42+
'contentTypeId' => 987,
43+
]);
4044

4145
$this->tag($value);
4246

@@ -45,7 +49,11 @@ public function it_tags_with_content_and_content_type_id(ResponseTagger $tagHand
4549

4650
public function it_tags_with_location_id_if_one_is_set(ResponseTagger $tagHandler): void
4751
{
48-
$value = new ContentInfo(['mainLocationId' => 456]);
52+
$value = new ContentInfo([
53+
'id' => 123,
54+
'mainLocationId' => 456,
55+
'contentTypeId' => 987,
56+
]);
4957

5058
$this->tag($value);
5159

spec/ResponseTagger/Value/LocationTaggerSpec.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,24 @@ public function it_ignores_non_location(ResponseTagger $tagHandler): void
3737

3838
public function it_tags_with_location_id_if_not_main_location(ResponseTagger $tagHandler): void
3939
{
40-
$value = new Location(['id' => 123, 'contentInfo' => new ContentInfo(['mainLocationId' => 321])]);
40+
$value = new Location([
41+
'id' => 123,
42+
'contentInfo' => new ContentInfo(['mainLocationId' => 321]),
43+
'parentLocationId' => 456,
44+
]);
45+
4146
$this->tag($value);
4247

4348
$tagHandler->addTags(['l123'])->shouldHaveBeenCalled();
4449
}
4550

4651
public function it_tags_with_parent_location_id(ResponseTagger $tagHandler): void
4752
{
48-
$value = new Location(['parentLocationId' => 123, 'contentInfo' => new ContentInfo()]);
53+
$value = new Location([
54+
'id' => 8,
55+
'parentLocationId' => 123,
56+
'contentInfo' => new ContentInfo(),
57+
]);
4958

5059
$this->tag($value);
5160

@@ -54,7 +63,12 @@ public function it_tags_with_parent_location_id(ResponseTagger $tagHandler): voi
5463

5564
public function it_tags_with_path_items(ResponseTagger $tagHandler): void
5665
{
57-
$value = new Location(['pathString' => '/1/2/123', 'contentInfo' => new ContentInfo()]);
66+
$value = new Location([
67+
'id' => 4,
68+
'parentLocationId' => 123,
69+
'pathString' => '/1/2/123',
70+
'contentInfo' => new ContentInfo(),
71+
]);
5872

5973
$this->tag($value);
6074

0 commit comments

Comments
 (0)