Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kevinfodness opened this issue May 5, 2023 · 0 comments
Open

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

kevinfodness opened this issue May 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kevinfodness
Copy link
Member

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

@kevinfodness kevinfodness added the bug Something isn't working label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant