Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3920

How to post data in symfony using objectManager?

$
0
0

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.


Viewing all articles
Browse latest Browse all 3920

Trending Articles