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
2 changes: 2 additions & 0 deletions src/Metadata/ApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ public function __construct(
protected ?bool $strictQueryParameterValidation = null,
protected ?bool $hideHydraOperation = null,
protected ?bool $jsonStream = null,
protected ?bool $throwOnNotFound = null,
protected array $extraProperties = [],
?bool $map = null,
protected ?array $mcp = null,
Expand Down Expand Up @@ -1026,6 +1027,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map,
);
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function __construct(
?bool $strictQueryParameterValidation = null,
protected ?bool $hideHydraOperation = null,
?bool $jsonStream = null,
?bool $throwOnNotFound = null,
array $extraProperties = [],
?bool $map = null,
) {
Expand Down Expand Up @@ -187,6 +188,7 @@ class: $class,
parameters: $parameters,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
throwOnNotFound: $throwOnNotFound,
stateOptions: $stateOptions,
map: $map
);
Expand Down
1 change: 1 addition & 0 deletions src/Metadata/Extractor/XmlResourceExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private function buildBase(\SimpleXMLElement $resource): array
'write' => $this->phpize($resource, 'write', 'bool'),
'jsonStream' => $this->phpize($resource, 'jsonStream', 'bool'),
'map' => $this->phpize($resource, 'map', 'bool'),
'throwOnNotFound' => $this->phpize($resource, 'throwOnNotFound', 'bool'),
];
}

Expand Down
1 change: 1 addition & 0 deletions src/Metadata/Extractor/YamlResourceExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ private function buildBase(array $resource): array
'write' => $this->phpize($resource, 'write', 'bool'),
'jsonStream' => $this->phpize($resource, 'jsonStream', 'bool'),
'map' => $this->phpize($resource, 'map', 'bool'),
'throwOnNotFound' => $this->phpize($resource, 'throwOnNotFound', 'bool'),
];
}

Expand Down
1 change: 1 addition & 0 deletions src/Metadata/Extractor/schema/resources.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@
<xsd:attribute type="xsd:boolean" name="collectDenormalizationErrors"/>
<xsd:attribute type="xsd:boolean" name="jsonStream"/>
<xsd:attribute type="xsd:boolean" name="map"/>
<xsd:attribute type="xsd:boolean" name="throwOnNotFound"/>
</xsd:attributeGroup>

<xsd:attributeGroup name="extendedBase">
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function __construct(
?bool $strictQueryParameterValidation = null,
protected ?bool $hideHydraOperation = null,
?bool $jsonStream = null,
?bool $throwOnNotFound = null,
array $extraProperties = [],
?bool $map = null,
) {
Expand Down Expand Up @@ -186,6 +187,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map
);
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/GetCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function __construct(
protected ?bool $hideHydraOperation = null,
?bool $jsonStream = null,
array $extraProperties = [],
?bool $throwOnNotFound = null,
private ?string $itemUriTemplate = null,
?bool $map = null,
) {
Expand Down Expand Up @@ -181,6 +182,7 @@ class: $class,
processor: $processor,
parameters: $parameters,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
rules: $rules,
policy: $policy,
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/HttpOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public function __construct(
array|string|null $middleware = null,
?bool $queryParameterValidationEnabled = null,
?bool $jsonStream = null,
?bool $throwOnNotFound = null,
array $extraProperties = [],
?bool $map = null,
) {
Expand Down Expand Up @@ -283,6 +284,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map
);
Expand Down
14 changes: 14 additions & 0 deletions src/Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function __construct(
protected ?bool $hideHydraOperation = null,
protected ?bool $jsonStream = null,
protected ?bool $map = null,
protected ?bool $throwOnNotFound = null,
protected array $extraProperties = [],
) {
if (\is_array($parameters) && $parameters) {
Expand Down Expand Up @@ -655,6 +656,19 @@ public function withMiddleware(string|array $middleware): static
return $self;
}

public function getThrowOnNotFound(): ?bool
{
return $this->throwOnNotFound;
}

public function withThrowOnNotFound(bool $throwOnNotFound): static
{
$self = clone $this;
$self->throwOnNotFound = $throwOnNotFound;

return $self;
}

public function getExtraProperties(): ?array
{
return $this->extraProperties;
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ public function __construct(
protected ?bool $strictQueryParameterValidation = null,
protected ?bool $hideHydraOperation = null,
protected ?bool $jsonStream = null,
protected ?bool $throwOnNotFound = null,
protected array $extraProperties = [],
?bool $map = null,
) {
Expand Down Expand Up @@ -862,6 +863,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map
);
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Patch.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function __construct(
?bool $strictQueryParameterValidation = null,
?bool $hideHydraOperation = null,
?bool $jsonStream = null,
?bool $throwOnNotFound = null,
array $extraProperties = [],
?bool $map = null,
) {
Expand Down Expand Up @@ -187,6 +188,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map
);
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function __construct(
?string $policy = null,
array|string|null $middleware = null,
?bool $jsonStream = null,
?bool $throwOnNotFound = null,
array $extraProperties = [],
private ?string $itemUriTemplate = null,
?bool $strictQueryParameterValidation = null,
Expand Down Expand Up @@ -188,6 +189,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map
);
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Put.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function __construct(
?string $policy = null,
array|string|null $middleware = null,
?bool $jsonStream = null,
?bool $throwOnNotFound = null,
array $extraProperties = [],
?bool $strictQueryParameterValidation = null,
?bool $hideHydraOperation = null,
Expand Down Expand Up @@ -188,6 +189,7 @@ class: $class,
strictQueryParameterValidation: $strictQueryParameterValidation,
hideHydraOperation: $hideHydraOperation,
jsonStream: $jsonStream,
throwOnNotFound: $throwOnNotFound,
extraProperties: $extraProperties,
map: $map
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ final class XmlResourceAdapter implements ResourceAdapterInterface
'stateOptions',
'collectDenormalizationErrors',
'jsonStream',
'throwOnNotFound',
'links',
'parameters',
];
Expand Down
Loading
Loading