I am trying to post to table. I am using objectManager.
use Doctrine\Common\Persistence\ObjectManager;
public function postListsAction(ObjectManager $objectManager, Request $request)
{
dump($request);
But I am getting following error in postman.
Cannot autowire argument $objectManager of \"App\\Controller\\ListController::postListsAction()\": it references interface \"Doctrine\\Persistence\\ObjectManager\" but no such service exists. You should maybe alias this interface to the existing \"doctrine.orm.default_entity_manager\" service.
If I hover over that $objectManager, I get Class 'ObjectManager' is deprecated
error as well.