diff --git a/composer.json b/composer.json index 5668851..c361b87 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "wp-cli/wp-cli": "^2.12" + "wp-cli/wp-cli": "^2.13" }, "require-dev": { "wp-cli/wp-cli-tests": "^5" diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 6617019..e2924c0 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -51,4 +51,5 @@ + /tests/phpstan/scan-files diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 209ff06..bc00cf0 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,7 +7,10 @@ parameters: - vendor/wp-cli/wp-cli/php scanFiles: - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php + - tests/phpstan/scan-files.php treatPhpDocTypesAsCertain: false ignoreErrors: - identifier: missingType.parameter - identifier: missingType.return + dynamicConstantNames: + - ABSPATH diff --git a/tests/phpstan/scan-files.php b/tests/phpstan/scan-files.php new file mode 100644 index 0000000..91897b8 --- /dev/null +++ b/tests/phpstan/scan-files.php @@ -0,0 +1,4 @@ +