Skip to content

Commit

Permalink
fix: property called default in ApiProperty has incorrect type (#6471) (
Browse files Browse the repository at this point in the history
#6472)

The param annotation for default is set as `string|null` but should be
no type, or mixed (like the example property)
  • Loading branch information
UnseenBook authored Jul 19, 2024
1 parent e3013d4 commit 71dbfb1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Metadata/ApiProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ final class ApiProperty
* @param bool|null $writableLink https://api-platform.com/docs/core/serialization/#force-iri-with-relations-of-the-same-type-parentchilds-relations
* @param bool|null $required https://api-platform.com/docs/admin/validation/#client-side-validation
* @param bool|null $identifier https://api-platform.com/docs/core/identifiers/
* @param string|null $default
* @param mixed $example https://api-platform.com/docs/core/openapi/#using-the-openapi-and-swagger-contexts
* @param string|null $deprecationReason https://api-platform.com/docs/core/deprecations/#deprecating-resource-classes-operations-and-properties
* @param bool|null $fetchEager https://api-platform.com/docs/core/performance/#eager-loading
Expand All @@ -50,7 +49,7 @@ public function __construct(
private ?bool $writableLink = null,
private ?bool $required = null,
private ?bool $identifier = null,
private $default = null,
private mixed $default = null,
private mixed $example = null,
/**
* The `deprecationReason` option deprecates the current operation with a deprecation message.
Expand Down

0 comments on commit 71dbfb1

Please sign in to comment.