Skip to content

Commit 18bf00b

Browse files
committed
fix(symfony): skip argument resolver when context is not api platform
fixes #7574
1 parent 49d80c8 commit 18bf00b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Bundle/ArgumentResolver/PayloadArgumentResolver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
7171
private function getExpectedInputClass(Request $request): ?string
7272
{
7373
$operation = $this->initializeOperation($request);
74+
if (!$operation) {
75+
return null;
76+
}
77+
7478
if (Request::METHOD_DELETE === $request->getMethod() || $request->isMethodSafe() || !($operation?->canDeserialize() ?? true)) {
7579
return null;
7680
}

0 commit comments

Comments
 (0)