What could be the reason for this error in Symfony 5
Cannot autowire argument $post of "App\Controller\PostController::show()": it references class "App\Entity\Post" but no such service exists.
I have this in twig:
{{ path('post.show', {id:post.id}) }}
/**
* @Route("/show/{id}", name="show")
* @param Post $post
* @return Response
*/
public function show(Post $post)
{
dump($post); die;
return $this->render('post/show.html.twig', [
'post' => $post,
]);
}