File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Serializer/Mapping/Loader Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 2626 *
2727 * @author Kévin Dunglas <[email protected] > 2828 */
29- #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_PARAMETER | \Attribute::TARGET_CLASS_CONSTANT | \Attribute::TARGET_CLASS )]
29+ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_PARAMETER | \Attribute::TARGET_CLASS_CONSTANT | \Attribute::TARGET_CLASS | \Attribute:: IS_REPEATABLE )]
3030final class ApiProperty
3131{
3232 private ?array $ types ;
@@ -219,7 +219,7 @@ public function __construct(
219219 private array $ extraProperties = [],
220220 ) {
221221 $ this ->types = \is_string ($ types ) ? (array ) $ types : $ types ;
222- $ this ->serialize = \is_array ($ serialize ) ? $ serialize : ( array ) $ serialize ;
222+ $ this ->serialize = \is_array ($ serialize ) ? $ serialize : [ $ serialize] ;
223223 }
224224
225225 public function getProperty (): ?string
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ public function __construct(private readonly PropertyNameCollectionFactoryInterf
4040
4141 public function loadClassMetadata (ClassMetadataInterface $ classMetadata ): bool
4242 {
43- $ attributesMetadata = $ classMetadata ->getAttributesMetadata ();
4443 // It's very weird to grab Eloquent's properties in that case as they're never serialized
4544 // the Serializer makes a call on the abstract class, let's save some unneeded work with a condition
4645 if (Model::class === $ classMetadata ->getName ()) {
You can’t perform that action at this time.
0 commit comments