WordPress / WordPress/WordPress-Coding-Standards

phpenv not always available

Open
#1,899 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Good first issue Status: Help wanted Type: Documentation
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 develop branch of WPCS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.