5757 // https://github.com/api-platform/admin/issues/370
5858 new Put (
5959 uriTemplate: '/admin/reviews/{id}{._format} ' ,
60- processor: ReviewPersistProcessor::class
6160 ),
6261 new Delete (
6362 uriTemplate: '/admin/reviews/{id}{._format} ' ,
@@ -167,7 +166,7 @@ class Review
167166 #[ORM \CustomIdGenerator(class: UuidGenerator::class)]
168167 #[ORM \GeneratedValue(strategy: 'CUSTOM ' )]
169168 #[ORM \Id]
170- private ? Uuid $ id = null ;
169+ private Uuid $ id ;
171170
172171 /**
173172 * @see https://schema.org/author
@@ -176,7 +175,7 @@ class Review
176175 #[Groups(groups: ['Review:read ' ])]
177176 #[ORM \ManyToOne(targetEntity: User::class)]
178177 #[ORM \JoinColumn(nullable: false )]
179- public ? User $ user = null ;
178+ public User $ user ;
180179
181180 /**
182181 * @see https://schema.org/itemReviewed
@@ -186,15 +185,15 @@ class Review
186185 #[Groups(groups: ['Review:read ' , 'Review:write:admin ' ])]
187186 #[ORM \ManyToOne(targetEntity: Book::class, inversedBy: 'reviews ' )]
188187 #[ORM \JoinColumn(nullable: false , onDelete: 'CASCADE ' )]
189- public ? Book $ book = null ;
188+ public Book $ book ;
190189
191190 /**
192191 * @see https://schema.org/datePublished
193192 */
194193 #[ApiProperty(types: ['https://schema.org/datePublished ' ])]
195194 #[Groups(groups: ['Review:read ' ])]
196195 #[ORM \Column(type: 'datetime_immutable ' )]
197- public ? \ DateTimeInterface $ publishedAt = null ;
196+ public \ DateTimeImmutable $ publishedAt ;
198197
199198 /**
200199 * @see https://schema.org/reviewBody
@@ -203,7 +202,7 @@ class Review
203202 #[Assert \NotBlank(allowNull: false )]
204203 #[Groups(groups: ['Review:read ' , 'Review:write ' ])]
205204 #[ORM \Column(type: Types::TEXT )]
206- public ? string $ body = null ;
205+ public string $ body ;
207206
208207 /**
209208 * @see https://schema.org/reviewRating
@@ -213,7 +212,7 @@ class Review
213212 #[Assert \Range(min: 0 , max: 5 )]
214213 #[Groups(groups: ['Review:read ' , 'Review:write ' ])]
215214 #[ORM \Column(type: 'smallint ' )]
216- public ? int $ rating = null ;
215+ public int $ rating ;
217216
218217 /**
219218 * @deprecated use the rating property instead
@@ -224,7 +223,7 @@ class Review
224223 #[ORM \Column(nullable: true )]
225224 public ?string $ letter = null ;
226225
227- public function getId (): ? Uuid
226+ public function getId (): Uuid
228227 {
229228 return $ this ->id ;
230229 }
0 commit comments