8000 [make:crud] use `getString()` instead of `get()` for csrf token by seb-jean · Pull Request #1545 · symfony/maker-bundle · GitHub
[go: up one dir, main page]

Skip to content

[make:crud] use getString() instead of get() for csrf token #1545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2024
Merged
Changes from 1 commit
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
CD84
Diff view
Prev Previous commit
[make:crud] fix fixture
  • Loading branch information
jrushlow committed May 14, 2024
commit 6130b9e51305f73454c05f21a6a63e439801a19d
2 changes: 1 addition & 1 deletion tests/fixtures/make-crud/expected/WithCustomRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function edit(Request $request, SweetFood $sweetFood, EntityManagerInterf
#[Route('/{id}', name: 'app_sweet_food_delete', methods: ['POST'])]
public function delete(Request $request, SweetFood $sweetFood, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete'.$sweetFood->getId(), $request->getPayload()->get('_token'))) {
if ($this->isCsrfTokenValid('delete'.$sweetFood->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($sweetFood);
$entityManager->flush();
}
Expand Down
0