mongoDB custom query not working with symfony mongo client

I m trying to get a result from MongoDB custom query via the use of mongo-client in Symfony. Controller Code: $query = “db.User.find({}).toArray()”; $client = new MongoClient(“mongodb://ravi.d:[email protected]:27017”); $db = $client->selectDB(“Demo”); $result = $db->execute($query); In my local machine, they give me…

Symfony 4 autowiring not working properly

Here is the context: Installed beanstalk bundle with composer “composer require leezy/pheanstalk-bundle” I’m trying to using inside a command but i get this error Cannot autowire service “AppCommandWorkerProcessParserCommand”: argument “$pheanstalk” of method “__construct()” references interface “PheanstalkContractPheanstalkInterface” but no such service…

MEMBER OF with array_values AND operator

there is my problem : return $this->createQueryBuilder(‘p’) ->select(‘p as post’) ->where(‘:tags MEMBER OF p.tags’) ->setParameter(‘tags’, array_values($tagArray)) ->orderBy(‘p.postedAt’, ‘DESC’) ->setFirstResult($start) ->setMaxResults($limit) ->getQuery() ->getResult() ; With this code, I can retrieve all posts that have as tags those present in $tagArray. But…