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 26
26
*
27
27
* @author Kévin Dunglas <[email protected] >
28
28
*/
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 )]
30
30
final class ApiProperty
31
31
{
32
32
private ?array $ types ;
@@ -219,7 +219,7 @@ public function __construct(
219
219
private array $ extraProperties = [],
220
220
) {
221
221
$ 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] ;
223
223
}
224
224
225
225
public function getProperty (): ?string
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ public function __construct(private readonly PropertyNameCollectionFactoryInterf
40
40
41
41
public function loadClassMetadata (ClassMetadataInterface $ classMetadata ): bool
42
42
{
43
- $ attributesMetadata = $ classMetadata ->getAttributesMetadata ();
44
43
// It's very weird to grab Eloquent's properties in that case as they're never serialized
45
44
// the Serializer makes a call on the abstract class, let's save some unneeded work with a condition
46
45
if (Model::class === $ classMetadata ->getName ()) {
You can’t perform that action at this time.
0 commit comments