diff --git a/node-packages/wp-tooling/CHANGELOG.md b/node-packages/wp-tooling/CHANGELOG.md index 1b21ecc..6e074fc 100644 --- a/node-packages/wp-tooling/CHANGELOG.md +++ b/node-packages/wp-tooling/CHANGELOG.md @@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Fixed +- `lint/phpstan`: the generated `phpstan.neon.dist` marks the `node_modules`, `build` and `tests` excludes optional with `(?)`. PHPStan treats an excluded path that does not exist as a configuration error, so `composer analyse` failed in any project missing one of them. - Human-readable scaffold labels and the `wp/cli` command description now escape apostrophes and backslashes in PHP and JavaScript string literals, and quotes in block JSON metadata. Titles such as `Editor's "guide"` generate valid code while preserving the original display text. - Block and script module asset paths now derive the project root from `base_path`, so nested or root-level PSR-4 directories resolve build output correctly. - Generated block JavaScript follows the current shared ESLint formatting rules. diff --git a/node-packages/wp-tooling/scaffolds/lint/phpstan/templates/phpstan.neon.dist.mustache b/node-packages/wp-tooling/scaffolds/lint/phpstan/templates/phpstan.neon.dist.mustache index 8a09e11..4d55c5a 100644 --- a/node-packages/wp-tooling/scaffolds/lint/phpstan/templates/phpstan.neon.dist.mustache +++ b/node-packages/wp-tooling/scaffolds/lint/phpstan/templates/phpstan.neon.dist.mustache @@ -9,7 +9,9 @@ parameters: - src - includes excludePaths: + # PHPStan rejects an excluded path that does not exist, so the ones a + # project may not have are marked optional with (?). - vendor - - node_modules - - build - - tests + - node_modules (?) + - build (?) + - tests (?)