alleyinteractive / alleyinteractive/create-wordpress-plugin

[BUG]: Phpstan config invalid if installed in larger project

未关闭
#207 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
PHP
星标
35
派生
2
平均合并
1 天 11 小时
30 天内合并 PR
3

描述

### Description of the bug

The phpstan config points to an include file in the vendor directory within the plugin, but if the plugin is installed as part of a larger project, the vendor directory is up a few levels (either `../../vendor`, or `../../client-mu-plugins/vendor`). This should be updated in phpstan.neon based on the user's preference of installing as part of a larger project and hoisting composer dependencies to the root.

### Steps To Reproduce

1. Install a new plugin based on this repo
2. Say it's part of a larger project
3. Choose the option to hoist composer dependencies to the root
4. Add a script to the root config to run phpstan in the plugin's directory (e.g., `cd plugins/my-cool-plugin && phpstan`)
5. Notice that the command fails with an error that it can't find the include file in the vendor path

### Additional Information

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。