WordPress / WordPress/WordPress-Coding-Standards
phpenv not always available
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
Bug Description
The TravisCI example expects a rehash of phpenv, but phpenv is not available at my CI so a check would be pleasant.
What did you expect to happen? What actually happened?
I expected it to miss instead of hit because of a dependency check
Minimal Code Snippet
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
Environment
| Question | Answer |
|---|---|
| PHP version | 7.2 |
| PHP_CodeSniffer version | latest |
| WPCS version | latest |
| WPCS install type | git clone |
| IDE (if relevant) | not relevant |
Additional Context (optional)
I found this issue when I tried to port the code for Travis CI to Gitlab CI.
Tested Against develop branch?
- I have verified the issue still exists in the
developbranch of WPCS.
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 with the TravisCI example containing the phpenv rehash command and review how its dependency checks are handled. Reproduce the missing-phpenv scenario if possible; done means the CI example skips the rehash when phpenv is unavailable while preserving the existing behavior when it is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100