prettier / prettier/plugin-php
Plugin cannot be loaded when used as a global package
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
When I install this plugin with the prettier package as a global npm package
npm install --global prettier @prettier/plugin-php
I am unable to use the PHP plugin to format PHP code. When I format a PHP file, I get the following error...
$ prettier ./index.php --write
[error] Cannot find package '@prettier/plugin-php' imported from /home/john/Documents/website/noop.js
Please allow developers to install the plugin globally and be able to use the plugin to format PHP files.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the global installation and formatting commands from the issue, then trace how the CLI resolves @prettier/plugin-php for a globally installed package. Done means the same global commands format a PHP file without the package-not-found error; no repository files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, php
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100