phpro / phpro/api-problem

Interface for RFC specific field members

Open
#12 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
67
Forks
8
Avg merge
26m
Merged PRs (30d)
1

Description

Feature Request
Q A
New Feature yes
RFC yes
BC Break no
Summary

An additional interface with some getters for the RFC specific field members (chapter 3.1) would be very nice to have.

I have often mistyped on those fields. Some interface which let a developer implement specific methods to be strict about it would be great.

Just of the top of my head...

interface StrictApiProblemInterface
{
    public function getType(): ?string
    public function getTitle(): string
    public function getStatus(): ?int
    public function getDetail(): ?string
    public function getExtensions(): array
}

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 RFC 7807 §3.1 and the proposed StrictApiProblemInterface signatures in the issue. Check how the project currently represents RFC-specific fields, then verify that each getter maps to the specified member without introducing a BC break.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.