Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Oct 7, 2024
1 parent 78cdfe0 commit b173e20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Metadata/ApiProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class ApiProperty
* @param Type[] $builtinTypes
* @param string|null $uriTemplate (experimental) whether to return the subRessource collection IRI instead of an iterable of IRI
* @param string|null $property The property name
* @param array<int, Groups|SerializedName|SerializedPath|MaxDepth|Ignore|Context> $serialize
* @param array<int, Context|Groups|Ignore|SerializedName|SerializedPath|MaxDepth> $serialize
*/
public function __construct(
private ?string $description = null,
Expand Down Expand Up @@ -615,7 +615,7 @@ public function getSerialize(): ?array
}

/**
* @param array<int, Groups|SerializedName|SerializedPath|MaxDepth|Ignore|Context> $serialize
* @param array<int, Context|Groups|Ignore|SerializedName|SerializedPath|MaxDepth> $serialize
*/
public function withSerialize(array $serialize): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class XmlPropertyAdapter implements PropertyAdapterInterface
'property',
];

# Laravel only, we don't need xml support
// Laravel only, we don't need XML support
private const EXCLUDE = ['policy', 'serialize'];

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Serializer/Mapping/Loader/PropertyMetadataLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
$classGroups = [];
$classContextAnnotation = null;

// It's very weird to grab an eloquent's properties in that case as they're never serialized
// It's very weird to grab Eloquent's properties in that case as they're never serialized
// the Serializer makes a call on the abstract class, let's save some unneeded work with a condition
if (Model::class === $classMetadata->getName()) {
return false;
Expand Down Expand Up @@ -109,6 +109,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata): bool
continue;
}

// This code is adapted from Symfony\Component\Serializer\Mapping\Loader\AttributeLoader
foreach ($attributes[$propertyName] as $attr) {
if ($attr instanceof Groups) {
foreach ($attr->getGroups() as $group) {
Expand Down

0 comments on commit b173e20

Please sign in to comment.