Skip to content

Commit b714b70

Browse files
Merge remote-tracking branch 'origin/main' into 3.3
# Conflicts: # api/composer.lock # api/config/packages/api_platform.yaml # helm/api-platform/Chart.yaml
2 parents a37d894 + 720cc40 commit b714b70

File tree

15 files changed

+755
-961
lines changed

15 files changed

+755
-961
lines changed

.github/workflows/cd.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,15 @@ jobs:
6666
compose.yaml
6767
compose.prod.yaml
6868
set: |
69-
*.cache-from=type=gha,scope=${{ github.ref }}
70-
*.cache-from=type=gha,scope=refs/heads/main
71-
*.cache-to=type=gha,scope=${{ github.ref }},mode=max
69+
php.cache-from=type=gha,scope=${{ github.ref }}
70+
php.cache-from=type=gha,scope=refs/heads/main
71+
php.cache-to=type=gha,scope=${{ github.ref }},mode=max
72+
pwa.cache-from=type=gha,scope=${{ github.ref }}
73+
pwa.cache-from=type=gha,scope=refs/heads/main
74+
pwa.cache-to=type=gha,scope=${{ github.ref }},mode=max
75+
keycloak.cache-from=type=gha,scope=${{ github.ref }}
76+
keycloak.cache-from=type=gha,scope=refs/heads/main
77+
keycloak.cache-to=type=gha,scope=${{ github.ref }},mode=max
7278
-
7379
name: Docker push
7480
run: |

.github/workflows/ci.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ jobs:
3939
compose.yaml
4040
compose.override.yaml
4141
set: |
42-
*.cache-from=type=gha,scope=${{ github.ref }}
43-
*.cache-from=type=gha,scope=refs/heads/main
44-
*.cache-to=type=gha,scope=${{ github.ref }},mode=max
42+
php.cache-from=type=gha,scope=${{ github.ref }}
43+
php.cache-from=type=gha,scope=refs/heads/main
44+
php.cache-to=type=gha,scope=${{ github.ref }},mode=max
45+
pwa.cache-from=type=gha,scope=${{ github.ref }}
46+
pwa.cache-from=type=gha,scope=refs/heads/main
47+
pwa.cache-to=type=gha,scope=${{ github.ref }},mode=max
48+
keycloak.cache-from=type=gha,scope=${{ github.ref }}
49+
keycloak.cache-from=type=gha,scope=refs/heads/main
50+
keycloak.cache-to=type=gha,scope=${{ github.ref }},mode=max
4551
-
4652
name: Start services
4753
run: docker compose up --wait --no-build
@@ -130,10 +136,18 @@ jobs:
130136
compose.yaml
131137
compose.prod.yaml
132138
set: |
133-
*.cache-from=type=gha,scope=${{ github.ref }}-e2e
134-
*.cache-from=type=gha,scope=${{ github.ref }}
135-
*.cache-from=type=gha,scope=refs/heads/main
136-
*.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
139+
php.cache-from=type=gha,scope=${{ github.ref }}-e2e
140+
php.cache-from=type=gha,scope=${{ github.ref }}
141+
php.cache-from=type=gha,scope=refs/heads/main
142+
php.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
143+
pwa.cache-from=type=gha,scope=${{ github.ref }}-e2e
144+
pwa.cache-from=type=gha,scope=${{ github.ref }}
145+
pwa.cache-from=type=gha,scope=refs/heads/main
146+
pwa.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
147+
keycloak.cache-from=type=gha,scope=${{ github.ref }}-e2e
148+
keycloak.cache-from=type=gha,scope=${{ github.ref }}
149+
keycloak.cache-from=type=gha,scope=refs/heads/main
150+
keycloak.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
137151
-
138152
name: Start Services
139153
run: docker compose up --wait --no-build
@@ -229,7 +243,7 @@ jobs:
229243
-
230244
name: Get API changed files
231245
id: api-changed-files
232-
uses: tj-actions/changed-files@v44
246+
uses: tj-actions/changed-files@v45
233247
with:
234248
files: api/**/*.php
235249
-

api/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"php": ">=8.3",
66
"ext-ctype": "*",
77
"ext-iconv": "*",
8-
"api-platform/core": "^3.3",
8+
"api-platform/core": "^4.0@alpha",
99
"doctrine/common": "^3.4",
1010
"doctrine/doctrine-bundle": "^2.11",
1111
"doctrine/doctrine-fixtures-bundle": "^3.5",
@@ -34,20 +34,20 @@
3434
"symfony/uid": "7.1.*",
3535
"symfony/validator": "7.1.*",
3636
"symfony/yaml": "7.1.*",
37-
"web-token/jwt-bundle": "^3.3",
37+
"web-token/jwt-bundle": "^4.0",
3838
"webonyx/graphql-php": "^15.8",
3939
"zenstruck/foundry": "^2.0"
4040
},
4141
"require-dev": {
4242
"dama/doctrine-test-bundle": "^8.0",
43-
"justinrainbow/json-schema": "^5.2",
43+
"justinrainbow/json-schema": "^6.0",
4444
"phpstan/extension-installer": "^1.3",
4545
"phpstan/phpdoc-parser": "^1.26",
4646
"phpstan/phpstan": "^1.10",
4747
"phpstan/phpstan-doctrine": "^1.3",
4848
"phpstan/phpstan-phpunit": "^1.3",
4949
"phpstan/phpstan-symfony": "^1.3",
50-
"phpunit/phpunit": "^11.0",
50+
"phpunit/phpunit": "^11.3",
5151
"symfony/browser-kit": "7.1.*",
5252
"symfony/css-selector": "7.1.*",
5353
"symfony/debug-bundle": "7.1.*",

api/config/packages/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ when@test:
5050
audience: '%env(OIDC_AUD)%'
5151
issuers: [ '%env(OIDC_SERVER_URL)%' ]
5252
algorithm: 'ES256'
53-
key: '%env(OIDC_JWK)%'
53+
keyset: '{"keys":[%env(OIDC_JWK)%]}'
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
22
zenstruck_foundry:
3-
# Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh)
4-
auto_refresh_proxies: true
3+
orm:
4+
reset:
5+
entity_managers: [ 'default' ]

api/phpunit.xml.dist

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
colors="true"
88
bootstrap="tests/bootstrap.php"
99
cacheDirectory=".phpunit.cache"
10+
failOnWarning="true"
11+
failOnRisky="true"
12+
failOnDeprecation="true"
13+
failOnNotice="true"
14+
displayDetailsOnTestsThatTriggerDeprecations="true"
15+
displayDetailsOnTestsThatTriggerErrors="true"
16+
displayDetailsOnTestsThatTriggerNotices="true"
17+
displayDetailsOnTestsThatTriggerWarnings="true"
1018
>
1119
<php>
1220
<ini name="display_errors" value="1" />
@@ -27,9 +35,9 @@
2735
</testsuite>
2836
</testsuites>
2937

30-
<source>
38+
<source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="true">
3139
<include>
32-
<directory suffix=".php">src</directory>
40+
<directory>src</directory>
3341
</include>
3442
</source>
3543

api/src/Entity/Book.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Book
120120
example: 'https://openlibrary.org/books/OL2055137M.json'
121121
)]
122122
#[Assert\NotBlank(allowNull: false)]
123-
#[Assert\Url(protocols: ['https'])]
123+
#[Assert\Url(protocols: ['https'], requireTld: true)]
124124
#[Assert\Regex(pattern: '/^https:\/\/openlibrary.org\/books\/OL\d+[A-Z]{1}\.json$/')]
125125
#[Groups(groups: ['Book:read', 'Book:read:admin', 'Bookmark:read', 'Book:write'])]
126126
#[ORM\Column(unique: true)]

api/symfony.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
]
198198
},
199199
"phpunit/phpunit": {
200-
"version": "10.5",
200+
"version": "11.3",
201201
"recipe": {
202202
"repo": "github.com/symfony/recipes",
203203
"branch": "main",

api/tests/Api/ReviewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function asAUserICannotAddAReviewWithValidDataOnAnInvalidBook(): void
233233
self::assertJsonContains([
234234
'@type' => 'hydra:Error',
235235
'hydra:title' => 'An error occurred',
236-
'hydra:description' => 'Invalid identifier value or configuration.',
236+
'hydra:description' => 'Invalid uri variables.',
237237
]);
238238
}
239239

helm/api-platform/templates/hpa.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.autoscaling.enabled }}
2-
apiVersion: autoscaling/v2beta1
2+
apiVersion: autoscaling/v2
33
kind: HorizontalPodAutoscaler
44
metadata:
55
name: {{ include "api-platform.fullname" . }}
@@ -17,12 +17,16 @@ spec:
1717
- type: Resource
1818
resource:
1919
name: cpu
20-
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
20+
target:
21+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
22+
type: Utilization
2123
{{- end }}
2224
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
2325
- type: Resource
2426
resource:
2527
name: memory
26-
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
28+
target:
29+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
30+
type: Utilization
2731
{{- end }}
2832
{{- end }}

0 commit comments

Comments
 (0)