Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/Metadata/ApiProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
final class ApiProperty
{
/**
* @param bool|null $readableLink https://api-platform.com/docs/core/serialization/#force-iri-with-relations-of-the-same-type-parentchilds-relations
* @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
* @param array|null $jsonldContext https://api-platform.com/docs/core/extending-jsonld-context/#extending-json-ld-and-hydra-contexts
* @param array|null $openapiContext https://api-platform.com/docs/core/openapi/#using-the-openapi-and-swagger-contexts
* @param bool|null $push https://api-platform.com/docs/core/push-relations/
* @param string|null $security https://api-platform.com/docs/core/security
* @param string|null $securityPostDenormalize https://api-platform.com/docs/core/security/#executing-access-control-rules-after-denormalization
* @param string[] $types the RDF types of this property
* @param string[] $iris
* @param Type[] $builtinTypes
* @param string|null $uriTemplate (experimental) whether to return the subRessource collection IRI instead of an iterable of IRI
* @param bool|null $readableLink https://api-platform.com/docs/core/serialization/#force-iri-with-relations-of-the-same-type-parentchilds-relations
* @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
* @param array|null $jsonldContext https://api-platform.com/docs/core/extending-jsonld-context/#extending-json-ld-and-hydra-contexts
* @param array|null $openapiContext https://api-platform.com/docs/core/openapi/#using-the-openapi-and-swagger-contexts
* @param bool|null $push https://api-platform.com/docs/core/push-relations/
* @param string|\Stringable|null $security https://api-platform.com/docs/core/security
* @param string|\Stringable|null $securityPostDenormalize https://api-platform.com/docs/core/security/#executing-access-control-rules-after-denormalization
* @param string[] $types the RDF types of this property
* @param string[] $iris
* @param Type[] $builtinTypes
* @param string|null $uriTemplate (experimental) whether to return the subRessource collection IRI instead of an iterable of IRI
*/
public function __construct(
private ?string $description = null,
Expand Down Expand Up @@ -148,7 +148,7 @@ public function __construct(
*
* </div>
*/
private ?string $security = null,
private string|\Stringable|null $security = null,
/**
* The `securityPostDenormalize` option defines access to the current property after the denormalization process, based on Symfony Security.
* It receives an `object` variable related to the current object, and a `property` variable related to the current property.
Expand Down Expand Up @@ -192,7 +192,7 @@ public function __construct(
*
* </div>
*/
private ?string $securityPostDenormalize = null,
private string|\Stringable|null $securityPostDenormalize = null,
private array|string|null $types = null,
/*
* The related php types.
Expand Down Expand Up @@ -420,7 +420,7 @@ public function withPush($push): self

public function getSecurity(): ?string
{
return $this->security;
return $this->security instanceof \Stringable ? (string) $this->security : $this->security;
}

public function withSecurity($security): self
Expand All @@ -433,7 +433,7 @@ public function withSecurity($security): self

public function getSecurityPostDenormalize(): ?string
{
return $this->securityPostDenormalize;
return $this->securityPostDenormalize instanceof \Stringable ? (string) $this->securityPostDenormalize : $this->securityPostDenormalize;
}

public function withSecurityPostDenormalize($securityPostDenormalize): self
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/ApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,11 @@ public function __construct(
* </div>
*/
protected ?string $paginationType = null,
protected ?string $security = null,
protected string|\Stringable|null $security = null,
protected ?string $securityMessage = null,
protected ?string $securityPostDenormalize = null,
protected string|\Stringable|null $securityPostDenormalize = null,
protected ?string $securityPostDenormalizeMessage = null,
protected ?string $securityPostValidation = null,
protected string|\Stringable|null $securityPostValidation = null,
protected ?string $securityPostValidationMessage = null,
protected ?bool $compositeIdentifier = null,
protected ?array $exceptionToStatus = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/ErrorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ public function __construct(
?int $paginationMaximumItemsPerPage = null,
?bool $paginationPartial = null,
?string $paginationType = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?bool $compositeIdentifier = null,
?array $exceptionToStatus = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/GetCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/GraphQl/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/GraphQl/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/GraphQl/QueryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/GraphQl/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/HttpOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
32 changes: 16 additions & 16 deletions src/Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
abstract class Metadata
{
/**
* @param string|null $deprecationReason https://api-platform.com/docs/core/deprecations/#deprecating-resource-classes-operations-and-properties
* @param string|null $security https://api-platform.com/docs/core/security
* @param string|null $securityPostDenormalize https://api-platform.com/docs/core/security/#executing-access-control-rules-after-denormalization
* @param mixed|null $mercure
* @param mixed|null $messenger
* @param mixed|null $input
* @param mixed|null $output
* @param mixed|null $provider
* @param mixed|null $processor
* @param string|null $deprecationReason https://api-platform.com/docs/core/deprecations/#deprecating-resource-classes-operations-and-properties
* @param string|\Stringable|null $security https://api-platform.com/docs/core/security
* @param string|\Stringable|null $securityPostDenormalize https://api-platform.com/docs/core/security/#executing-access-control-rules-after-denormalization
* @param mixed|null $mercure
* @param mixed|null $messenger
* @param mixed|null $input
* @param mixed|null $output
* @param mixed|null $provider
* @param mixed|null $processor
*/
public function __construct(
protected ?string $shortName = null,
Expand Down Expand Up @@ -60,11 +60,11 @@ public function __construct(
protected ?bool $paginationClientPartial = null,
protected ?bool $paginationFetchJoinCollection = null,
protected ?bool $paginationUseOutputWalkers = null,
protected ?string $security = null,
protected string|\Stringable|null $security = null,
protected ?string $securityMessage = null,
protected ?string $securityPostDenormalize = null,
protected string|\Stringable|null $securityPostDenormalize = null,
protected ?string $securityPostDenormalizeMessage = null,
protected ?string $securityPostValidation = null,
protected string|\Stringable|null $securityPostValidation = null,
protected ?string $securityPostValidationMessage = null,
protected $provider = null,
protected $processor = null,
Expand Down Expand Up @@ -451,7 +451,7 @@ public function withPaginationUseOutputWalkers(bool $paginationUseOutputWalkers)

public function getSecurity(): ?string
{
return $this->security;
return $this->security instanceof \Stringable ? (string) $this->security : $this->security;
}

public function withSecurity($security): static
Expand All @@ -477,7 +477,7 @@ public function withSecurityMessage(string $securityMessage): static

public function getSecurityPostDenormalize(): ?string
{
return $this->securityPostDenormalize;
return $this->securityPostDenormalize instanceof \Stringable ? (string) $this->securityPostDenormalize : $this->securityPostDenormalize;
}

public function withSecurityPostDenormalize($securityPostDenormalize): static
Expand All @@ -503,10 +503,10 @@ public function withSecurityPostDenormalizeMessage(string $securityPostDenormali

public function getSecurityPostValidation(): ?string
{
return $this->securityPostValidation;
return $this->securityPostValidation instanceof \Stringable ? (string) $this->securityPostValidation : $this->securityPostValidation;
}

public function withSecurityPostValidation(?string $securityPostValidation = null): static
public function withSecurityPostValidation(string|\Stringable|null $securityPostValidation = null): static
{
$self = clone $this;
$self->securityPostValidation = $securityPostValidation;
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/NotExposed.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,11 @@ public function __construct(
protected ?array $normalizationContext = null,
protected ?array $denormalizationContext = null,
protected ?bool $collectDenormalizationErrors = null,
protected ?string $security = null,
protected string|\Stringable|null $security = null,
protected ?string $securityMessage = null,
protected ?string $securityPostDenormalize = null,
protected string|\Stringable|null $securityPostDenormalize = null,
protected ?string $securityPostDenormalizeMessage = null,
protected ?string $securityPostValidation = null,
protected string|\Stringable|null $securityPostValidation = null,
protected ?string $securityPostValidationMessage = null,
/**
* The `deprecationReason` option deprecates the current operation with a deprecation message.
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Patch.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function __construct(
?array $normalizationContext = null,
?array $denormalizationContext = null,
?bool $collectDenormalizationErrors = null,
?string $security = null,
string|\Stringable|null $security = null,
?string $securityMessage = null,
?string $securityPostDenormalize = null,
string|\Stringable|null $securityPostDenormalize = null,
?string $securityPostDenormalizeMessage = null,
?string $securityPostValidation = null,
string|\Stringable|null $securityPostValidation = null,
?string $securityPostValidationMessage = null,
?string $deprecationReason = null,
?array $filters = null,
Expand Down
Loading