I am developing a Drupal site using the latest official Drupal/PHP/Apache Docker image.
I have some local directories mapped to inside the Drupal container as expected (modules, profiles, sites, themes).
When I create a module and try to, for example, extend a Drupal class such as BlockBase, I get an error saying BlockBase is undefined. This is because the Drupal core code is inside of the container, which intelephense and intellisense can't see. Note the code is actually perfectly fine when it is run.
This problem also means I don't get any autocompletion or suggestions for methods and such.
Is there a way to resolve this issue, for example by somehow giving intelephense access to inside of the container?