From df626f9e21ec991034f13079900b3332ecaa2c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Ceslav=20Przywara?= Date: Thu, 19 Oct 2023 11:43:40 +0200 Subject: [PATCH] Update PHPStan for WordPress --- composer.lock | 54 ++++++++++++++++------------- tests/static-analysis/bootstrap.php | 1 - 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index 284ae51..154bf98 100644 --- a/composer.lock +++ b/composer.lock @@ -840,16 +840,16 @@ }, { "name": "php-stubs/wordpress-stubs", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "adda7609e71d5f4dc7b87c74f8ec9e3437d2e92c" + "reference": "f22b00cacd3b9addc2b07ff48290084503c48574" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/adda7609e71d5f4dc7b87c74f8ec9e3437d2e92c", - "reference": "adda7609e71d5f4dc7b87c74f8ec9e3437d2e92c", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f22b00cacd3b9addc2b07ff48290084503c48574", + "reference": "f22b00cacd3b9addc2b07ff48290084503c48574", "shasum": "" }, "require-dev": { @@ -862,6 +862,7 @@ }, "suggest": { "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" }, "type": "library", @@ -878,9 +879,9 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.3.0" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.3.2" }, - "time": "2023-08-10T16:34:11+00:00" + "time": "2023-10-14T10:08:05+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -931,16 +932,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.29", + "version": "1.10.39", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1" + "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", - "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4", + "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4", "shasum": "" }, "require": { @@ -989,7 +990,7 @@ "type": "tidelift" } ], - "time": "2023-08-14T13:24:11+00:00" + "time": "2023-10-17T15:46:26+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2501,16 +2502,16 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -2519,7 +2520,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2560,7 +2561,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -2576,26 +2577,26 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "szepeviktor/phpstan-wordpress", - "version": "v1.3.0", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/szepeviktor/phpstan-wordpress.git", - "reference": "5b5cc77ed51fdaf64efe3f00b5aae4b709d2cfa9" + "reference": "b8516ed6bab7ec50aae981698ce3f67f1be2e45a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/5b5cc77ed51fdaf64efe3f00b5aae4b709d2cfa9", - "reference": "5b5cc77ed51fdaf64efe3f00b5aae4b709d2cfa9", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/b8516ed6bab7ec50aae981698ce3f67f1be2e45a", + "reference": "b8516ed6bab7ec50aae981698ce3f67f1be2e45a", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", - "phpstan/phpstan": "^1.10.0", + "phpstan/phpstan": "^1.10.30", "symfony/polyfill-php73": "^1.12.0" }, "require-dev": { @@ -2606,6 +2607,9 @@ "phpunit/phpunit": "^8.0 || ^9.0", "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8" }, + "suggest": { + "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" + }, "type": "phpstan-extension", "extra": { "phpstan": { @@ -2633,9 +2637,9 @@ ], "support": { "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", - "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.0" + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.2" }, - "time": "2023-04-23T06:15:06+00:00" + "time": "2023-10-16T17:23:56+00:00" }, { "name": "theseer/tokenizer", diff --git a/tests/static-analysis/bootstrap.php b/tests/static-analysis/bootstrap.php index f00dfbc..920b32c 100644 --- a/tests/static-analysis/bootstrap.php +++ b/tests/static-analysis/bootstrap.php @@ -3,7 +3,6 @@ define('WPINC', ''); define('WP_CONTENT_DIR', ''); define('WP_CONTENT_URL', ''); -define('WP_PLUGIN_DIR', ''); define('WP_PLUGIN_URL', ''); define('AUTH_COOKIE', ''); define('SECURE_AUTH_COOKIE', '');