Refactor to make it easier to add new formats

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start by locating the format classes and the URL-matching logic that currently requires edits when adding a format. Trace how a URL is matched to a format and check whether format declarations are centralized. Done means a new format can be added by creating its class and declaring it in one place, without changing URL-matching code.

Written by the indexing model from the issue text.

Description

Adding a new format should require only adding a new Format class and declaring it somewhere. Currently it requires changing a few files because of the way the URL matching works.

Dominant language
PHP
Stars
96
Forks
17
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from aaronpk/XRay

All issues in aaronpk/XRay

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.