From c332d8b513a6a743a030f4e9cc04fa748c8562bf Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:36:01 +0100 Subject: [PATCH 1/4] fix: use ApiProperty::iris instead of ApiProperty::type to specify https://schema.org/name --- api/src/Entity/Book.php | 2 +- api/src/Entity/User.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Entity/Book.php b/api/src/Entity/Book.php index 1bcda2eef..74309f116 100644 --- a/api/src/Entity/Book.php +++ b/api/src/Entity/Book.php @@ -120,7 +120,7 @@ class Book #[ApiFilter(OrderFilter::class)] #[ApiFilter(SearchFilter::class, strategy: 'i' . SearchFilterInterface::STRATEGY_PARTIAL)] #[ApiProperty( - types: ['https://schema.org/name'], + iris: ['https://schema.org/name'], example: 'Hyperion' )] #[Groups(groups: ['Book:read', 'Book:read:admin', 'Bookmark:read', 'Review:read:admin'])] diff --git a/api/src/Entity/User.php b/api/src/Entity/User.php index f530f3657..f9e2e6fb1 100644 --- a/api/src/Entity/User.php +++ b/api/src/Entity/User.php @@ -121,7 +121,7 @@ public function getUserIdentifier(): string /** * @see https://schema.org/name */ - #[ApiProperty(types: ['https://schema.org/name'])] + #[ApiProperty(iris: ['https://schema.org/name'])] #[Groups(groups: ['User:read', 'Review:read'])] public function getName(): ?string { From 8cb544422aebed85c76cedb73ec4216494e0432a Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:36:18 +0100 Subject: [PATCH 2/4] fix: install zip for composer --- api/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/api/Dockerfile b/api/Dockerfile index ee11ee073..5df79082f 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -27,6 +27,7 @@ RUN apt-get update; \ file \ gettext \ git \ + zip \ ; \ rm -rf /var/lib/apt/lists/* From 3081c32919ac01e005d151b58d3f8559c0c65323 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:36:50 +0100 Subject: [PATCH 3/4] fix: remove "version" Docker Compose obsolete option --- compose.e2e.yaml | 2 -- compose.override.yaml | 2 -- compose.prod.yaml | 2 -- compose.yaml | 2 -- 4 files changed, 8 deletions(-) diff --git a/compose.e2e.yaml b/compose.e2e.yaml index c8b0f2c20..80fb79663 100644 --- a/compose.e2e.yaml +++ b/compose.e2e.yaml @@ -1,5 +1,3 @@ -version: "3.8" - services: keycloak: environment: diff --git a/compose.override.yaml b/compose.override.yaml index f07decc7a..d40ade429 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -1,5 +1,3 @@ -version: "3.4" - # Development environment override services: php: diff --git a/compose.prod.yaml b/compose.prod.yaml index f77172349..dc3220c08 100644 --- a/compose.prod.yaml +++ b/compose.prod.yaml @@ -1,5 +1,3 @@ -version: "3.4" - # Production environment override services: php: diff --git a/compose.yaml b/compose.yaml index 2ad56b665..05b24cf2b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,5 +1,3 @@ -version: "3.4" - services: php: image: ${IMAGES_PREFIX:-}app-php From c8fa5d7c6e7b055412a7f8449b9a10e42ca889c4 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:43:36 +0100 Subject: [PATCH 4/4] fix: improve PWA imports --- pwa/app/books/page.tsx | 1 - pwa/components/admin/book/Create.tsx | 2 +- pwa/components/admin/book/Edit.tsx | 4 ++-- pwa/components/admin/book/Form.tsx | 4 ++-- pwa/components/admin/book/List.tsx | 6 +++--- pwa/components/admin/review/List.tsx | 6 +++--- pwa/components/admin/review/Show.tsx | 4 ++-- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pwa/app/books/page.tsx b/pwa/app/books/page.tsx index fec08be98..46517cd38 100644 --- a/pwa/app/books/page.tsx +++ b/pwa/app/books/page.tsx @@ -46,7 +46,6 @@ async function getServerSideProps(query: Query, session: Session|null): Promise< try { const response: FetchResponse> | undefined = await fetchApi(buildUriFromFilters("/books", filters), { cache: "force-cache", - next: { revalidate: 3600 }, }, session); if (!response?.data) { throw new Error('Unable to retrieve data from /books.'); diff --git a/pwa/components/admin/book/Create.tsx b/pwa/components/admin/book/Create.tsx index f1950e8dc..b479e2c73 100644 --- a/pwa/components/admin/book/Create.tsx +++ b/pwa/components/admin/book/Create.tsx @@ -1,6 +1,6 @@ import { CreateGuesser, type CreateGuesserProps } from "@api-platform/admin"; -import { Form } from "../../../components/admin/book/Form"; +import { Form } from "./Form"; export const Create = (props: CreateGuesserProps) => ( diff --git a/pwa/components/admin/book/Edit.tsx b/pwa/components/admin/book/Edit.tsx index 6c7333250..a2ae50f3b 100644 --- a/pwa/components/admin/book/Edit.tsx +++ b/pwa/components/admin/book/Edit.tsx @@ -1,8 +1,8 @@ import { EditGuesser, type EditGuesserProps } from "@api-platform/admin"; import { TopToolbar } from 'react-admin'; -import { Form } from "../../../components/admin/book/Form"; -import { ShowButton } from "../../../components/admin/book/ShowButton"; +import { Form } from "./Form"; +import { ShowButton } from "./ShowButton"; // @ts-ignore const Actions = ({ data }) => ( diff --git a/pwa/components/admin/book/Form.tsx b/pwa/components/admin/book/Form.tsx index bed9b4e35..49b8b9c14 100644 --- a/pwa/components/admin/book/Form.tsx +++ b/pwa/components/admin/book/Form.tsx @@ -1,7 +1,7 @@ import { required } from "react-admin"; -import { ConditionInput } from "../../../components/admin/book/ConditionInput"; -import { BookInput } from "../../../components/admin/book/BookInput"; +import { ConditionInput } from "./ConditionInput"; +import { BookInput } from "./BookInput"; export const Form = () => ( <> diff --git a/pwa/components/admin/book/List.tsx b/pwa/components/admin/book/List.tsx index 544e67c22..6044a2822 100644 --- a/pwa/components/admin/book/List.tsx +++ b/pwa/components/admin/book/List.tsx @@ -8,9 +8,9 @@ import { EditButton, } from "react-admin"; -import { ShowButton } from "../../../components/admin/book/ShowButton"; -import { RatingField } from "../../../components/admin/review/RatingField"; -import { ConditionInput } from "../../../components/admin/book/ConditionInput"; +import { ShowButton } from "./ShowButton"; +import { RatingField } from "../review/RatingField"; +import { ConditionInput } from "./ConditionInput"; const ConditionField = (props: UseRecordContextParams) => { const record = useRecordContext(props); diff --git a/pwa/components/admin/review/List.tsx b/pwa/components/admin/review/List.tsx index b1f390f70..b9e2f545e 100644 --- a/pwa/components/admin/review/List.tsx +++ b/pwa/components/admin/review/List.tsx @@ -10,9 +10,9 @@ import { AutocompleteInput, } from "react-admin"; -import { BookField } from "../../../components/admin/review/BookField"; -import { RatingField } from "../../../components/admin/review/RatingField"; -import { RatingInput } from "../../../components/admin/review/RatingInput"; +import { BookField } from "./BookField"; +import { RatingField } from "./RatingField"; +import { RatingInput } from "./RatingInput"; import { type Book } from "../../../types/Book"; import { User } from "../../../types/User"; diff --git a/pwa/components/admin/review/Show.tsx b/pwa/components/admin/review/Show.tsx index 4e7efca2f..7dd935b6a 100644 --- a/pwa/components/admin/review/Show.tsx +++ b/pwa/components/admin/review/Show.tsx @@ -1,8 +1,8 @@ import { FieldGuesser, ShowGuesser, type ShowGuesserProps } from "@api-platform/admin"; import { TextField } from "react-admin"; -import { RatingField } from "../../../components/admin/review/RatingField"; -import { BookField } from "../../../components/admin/review/BookField"; +import { RatingField } from "./RatingField"; +import { BookField } from "./BookField"; export const Show = (props: ShowGuesserProps) => (