alleyinteractive / alleyinteractive/create-wordpress-plugin

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

Aperta
#207 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
PHP
Stelle
35
Fork
2
Merge medio
1g 11h
PR unite (30g)
3

Descrizione

### 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_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.