1 | <?php |
||
19 | class InterestedMovieController extends BaseController |
||
20 | { |
||
21 | /** |
||
22 | * @Route("/api/users/{id<\d+>}/interestedMovies", methods={"GET"}); |
||
23 | * |
||
24 | * @param Request $request |
||
25 | * @param User $user |
||
26 | * @param MovieRepository $repository |
||
27 | * |
||
28 | * @return JsonResponse |
||
29 | */ |
||
30 | 3 | public function getAll(Request $request, User $user, MovieRepository $repository) |
|
46 | |||
47 | /** |
||
48 | * @Route("/api/users/interestedMovies", methods={"POST"}); |
||
49 | * |
||
50 | * @param AddInterestedMovieRequest $request |
||
51 | * @param EntityManagerInterface $em |
||
52 | * @return JsonResponse |
||
53 | * @throws \Exception |
||
54 | */ |
||
55 | 3 | public function postInterestedMovies(AddInterestedMovieRequest $request, EntityManagerInterface $em) |
|
72 | |||
73 | /** |
||
74 | * @Route("/api/users/interestedMovies/{id<\d+>}", methods={"DELETE"}); |
||
75 | * |
||
76 | * @param int $id |
||
77 | * @param InterestedMovieRepository $repository |
||
78 | * @param EntityManagerInterface $em |
||
79 | * @return JsonResponse |
||
80 | */ |
||
81 | 2 | public function deleteInterestedMovies(int $id, InterestedMovieRepository $repository, EntityManagerInterface $em) |
|
101 | } |
||
102 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: