-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Description
API Platform version(s) affected: 4.2.0
Description
With an API resource that has a Delete operation, the ObjectMapperProcessor errors on line 46, as the processed entity is removed by Doctrine.
$this->decorated->process($this->objectMapper->map($data), $operation, $uriVariables, $context)
, which is processed by RemoveProcessor, returns nothing.
The mapper fails here: https://github.com/api-platform/core/blob/4.2/src/State/Processor/ObjectMapperProcessor.php#L46
How to reproduce
#[Delete(uriTemplate: '/users/{uuid}')]
#[Map]
class UserResource
{}
Possible Solution
Test the output of the processor?
Additional Context
ApiPlatform\\State\\ObjectMapper\\ObjectMapper::map(): Argument #1 ($source) must be of type object, null given, called in /app/vendor/api-platform/core/src/State/Processor/ObjectMapperProcessor.php on line 46
Metadata
Metadata
Assignees
Labels
No labels