-1

I have installed phpintellephsense and have enabled MongoDb extension for PHP. But apparently vscode can't recognize classes from mongodb extension, and can't give suggestion about that class... The code included work fine though...

I'm on ubuntu 21.04, using vscode 1.58.2, phpintelephsense v1.7.1, php 7.4 Please give me some direction ... class not recognized

cyh
  • 11
  • 2

1 Answers1

1

I just found the solution when I exploring Intellephsense setting.

Steps:

  1. Open Extension Panel on the Left, search for Intellephsense
  2. Click setting button(gear icon)
  3. Search setting 'Intellephsense:Stubs'
  4. Click 'Add Item', scroll to find mongodb, click 'Add'

Voila... all the jaggy red line vanished.. and when I hover on the variable, VSCode able to show description and available method from that class...

cyh
  • 11
  • 2