loading stubs installed via composer?

Hi,

I installed ‘php-stubs/wordpress-stubs’ via composer (tried with other stubs packages as well to no avail) but PHPStorm simply doesn't pick it up. WordPress functions and classes are always shown being undefined. Is there something else one needs to do to make stubs packages work?

cheers and thanks for the help

0
2 comments

I tried adding the stubs file in autoload-dev in composer.json but it didn't fix the issue.

"autoload-dev": {
  "files": [
    "vendor/php-stubs/wordpress-stubs/wordpress-stubs.php"
  ]
},
0

The problem was the file exceeding the maximum size of files for which PhpStorm provides coding assistance. I needed to add idea.max.intellisense.filesize=5120 to the PHPStorm's custom properties file (see: https://www.jetbrains.com/help/phpstorm/tuning-the-ide.html#common-platform-properties)

1

Please sign in to leave a comment.