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 }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- if .Values.autoscaling.enabled }}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: {{ include "api-platform.fullname" . }}-pwa
6+
labels:
7+
{{- include "api-platform.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "api-platform.fullname" . }}-pwa
13+
minReplicas: {{ .Values.autoscaling.minReplicas }}
14+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15+
metrics:
16+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17+
- type: Resource
18+
resource:
19+
name: cpu
20+
target:
21+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
22+
type: Utilization
23+
{{- end }}
24+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
25+
- type: Resource
26+
resource:
27+
name: memory
28+
target:
29+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
30+
type: Utilization
31+
{{- end }}
32+
{{- end }}

helm/api-platform/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ resources: {}
261261
replicaCount: 1
262262

263263
autoscaling:
264-
enabled: false
264+
enabled: true
265265
minReplicas: 1
266266
maxReplicas: 100
267-
targetCPUUtilizationPercentage: 80
267+
targetCPUUtilizationPercentage: 50
268268
# targetMemoryUtilizationPercentage: 80
269269

270270
nodeSelector: {}

pwa/components/admin/review/ReviewsList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
DateField,
44
Datagrid,
55
List,
6+
ListActions,
67
EditButton,
78
ShowButton,
89
ReferenceInput,
@@ -53,7 +54,7 @@ const filters = [
5354
];
5455

5556
export const ReviewsList = () => (
56-
<List filters={filters} exporter={false} hasCreate={false} title="Reviews">
57+
<List filters={filters} exporter={false} actions={<ListActions hasCreate={false} />} title="Reviews">
5758
<Datagrid>
5859
<TextField source="user.name" label="User" sortable={false} />
5960
<BookField source="book" sortable={false} />

pwa/package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,46 @@
1010
"test": "playwright test"
1111
},
1212
"dependencies": {
13-
"@api-platform/admin": "^3.4.9",
13+
"@api-platform/admin": "^4.0.1",
1414
"@api-platform/api-doc-parser": "^0.16.4",
15-
"@auth/core": "^0.34.1",
15+
"@auth/core": "^0.34.2",
1616
"@fontsource/poppins": "^5.0.14",
17-
"@mui/icons-material": "^5.15.21",
18-
"@mui/material": "^5.15.21",
17+
"@mui/icons-material": "^5.16.7",
18+
"@mui/material": "^5.16.7",
1919
"@tailwindcss/forms": "^0.5.7",
20-
"@tanstack/react-query": "^5.48.0",
21-
"@tanstack/react-query-devtools": "^5.48.0",
22-
"@tanstack/react-query-next-experimental": "^5.48.0",
23-
"autoprefixer": "^10.4.19",
20+
"@tanstack/react-query": "^5.51.23",
21+
"@tanstack/react-query-devtools": "^5.51.23",
22+
"@tanstack/react-query-next-experimental": "^5.51.23",
23+
"autoprefixer": "^10.4.20",
2424
"formik": "^2.4.6",
25-
"next": "^14.2.4",
25+
"next": "^14.2.5",
2626
"next-auth": "5.0.0-beta.16",
2727
"picocolors": "^1.0.1",
28-
"postcss": "^8.4.38",
29-
"ra-i18n-polyglot": "^4.16.19",
30-
"ra-language-english": "^4.16.19",
31-
"ra-language-french": "^4.16.19",
32-
"ra-ui-materialui": "^4.16.19",
28+
"postcss": "^8.4.41",
29+
"ra-i18n-polyglot": "^5.1.1",
30+
"ra-language-english": "^5.1.1",
31+
"ra-language-french": "^5.1.1",
32+
"ra-ui-materialui": "^5.1.1",
3333
"react": "^18.3.1",
34-
"react-admin": "^4.16.19",
34+
"react-admin": "^5.1.1",
3535
"react-dom": "^18.3.1",
36-
"react-hook-form": "^7.52.0",
36+
"react-hook-form": "^7.52.2",
3737
"react-spinners": "^0.14.1",
3838
"sharp": "^0.33.4",
3939
"slugify": "^1.6.6",
40-
"tailwindcss": "^3.4.4",
40+
"tailwindcss": "^3.4.9",
4141
"yup": "^1.4.0"
4242
},
4343
"devDependencies": {
44-
"@babel/core": "^7.24.7",
45-
"@playwright/test": "^1.45.0",
44+
"@babel/core": "^7.25.2",
45+
"@playwright/test": "^1.46.0",
4646
"@popperjs/core": "^2.11.8",
47-
"@types/node": "^20.14.9",
47+
"@types/node": "^22.1.0",
4848
"@types/react": "^18.3.3",
4949
"@types/react-dom": "^18.3.0",
5050
"eslint": "^8.57.0",
51-
"eslint-config-next": "^14.2.4",
52-
"typescript": "^5.5.2"
51+
"eslint-config-next": "^14.2.5",
52+
"typescript": "^5.5.4"
5353
},
5454
"peerDependencies": {
5555
"@babel/core": "^7.19.0",

0 commit comments

Comments
 (0)