WordPress / WordPress/Requests

Review parameter type declarations

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

Nobody has claimed this yet.

Type: breaking change
Dominant language
PHP
Stars
3.6k
Forks
500
Avg merge
2d 21h
Merged PRs (30d)
5

Description

While looking at something different, we noticed a number of places where parameters did not have (non-scalar) type declarations, while they could have.

It would probably be a good idea to do a review of the complete codebase to add object-based/array type declarations wherever possible.

This would not be a breaking change as overloading methods not having a type declaration, means those are declared as mixed and mixed is contravariant with any type, so this would not lead to signature mismatch errors.

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

Review the complete codebase for parameters without non-scalar type declarations, focusing on places where object-based or array declarations are possible. Done means adding compatible declarations wherever appropriate while preserving the stated non-breaking behavior; no specific files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.