PHPCompatibility / PHPCompatibility/PHPCompatibility

Consistent handling of features added/removed in multiple PHP minors

Open
#547 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: chores/QA Type: meta
Dominant language
PHP
Stars
2.3k
Forks
201
Avg merge
3d 18h
Merged PRs (30d)
42

Description

As per the comments in #545 / #544:

Some functions/parameters/extensions/other features are added/removed in several different PHP versions, like the OCI functions discussed in #545, which were added in PHP 7.0.21/23, 7.1.7/9 and 7.2.0.

This is most often the case when it concerns a PHP extension - in contrast to PHP Core -.

We may want to take a principle decision (always use lowest/highest PHP version where the function first appeared/was deprecated in last) and verify that the logic is applied consistently throughout the PHPCompatibility sniffs.

Oh and add the decision taken to the contributors guidelines so it's documented.

Alternatively, we could try and find a way to check against minors - related #531 -, though in that case, we'd still need a principle decision as - taking the above example - PHP 7.0.25 would contain the functions, but PHP 7.1.3 would not, so what should be reported when a testVersion of 7.0.25- would have been provided ?

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 by reading the comments and examples in #545 and #544, then compare the existing PHPCompatibility sniffs that handle features added or removed across PHP minors. Review #531 for the minor-version approach. Done means an agreed principle is applied consistently, with the decision recorded in the contributors guidelines.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.