diff --git a/.distignore b/.distignore index 25b2e9ec..3f1414b5 100644 --- a/.distignore +++ b/.distignore @@ -20,6 +20,7 @@ composer.lock package-lock.json package.json phpcs.xml +phpstan.neon.dist pnpm-lock.yaml README.md diff --git a/.gitignore b/.gitignore index 58a2e5b6..b9fcdc41 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ js/build js/link-attributes/block-editor/dist phpcs.txt +phpstan.neon +phpstan.txt \ No newline at end of file diff --git a/composer.json b/composer.json index 37ce2949..20faf2ba 100644 --- a/composer.json +++ b/composer.json @@ -59,6 +59,7 @@ "post-install-cmd": [ "echo Deleting .git dirs...", "rm -rf vendor/**/**/.git" - ] + ], + "phpstan": "phpstan --memory-limit=2048M > phpstan.txt" } } \ No newline at end of file diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..caf54ece --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,13 @@ +parameters: + level: 5 + paths: + - src + scanDirectories: + - ../../../wp-includes + - ../../../wp-admin + - ../../themes/bricks + - ../woocommerce + - ../wordpress-seo + - ../wp-seopress + ignoreErrors: + - '#Constant [A-Z0-9_]+ not found.#' \ No newline at end of file