Closed kallookoo closed 3 years ago
Hello! It is possible but I'd like to keep the stubs file clean.
WP-CLI function and class declaration stubs for static analysis.
"clean" in OOP sense, not in WordPress sense
And yes, I know WP-CLI suggests defined('WP_CLI')
https://github.com/wp-cli/wp-cli/blob/master/php/wp-cli.php#L4
Please create tests/phpstan/constants.php
and put WP_CLI
in there.
And it feels bad to choose one way:
Ok, I created another php with missings to include inside the vscode. Thanks
You may need to add it to dynamicConstantNames:
https://phpstan.org/config-reference#constants
Hi, I use this stubs by the constants are missing like WP_CLI, WP_CLI_VERSION, etc... Is possible to include? Thanks