WordPress / WordPress/phpdoc-parser

Only store a single post for each hook

Open
#94 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
239
Forks
81
Avg merge
16h 29m
Merged PRs (30d)
8

Description

At present we store an entry for a hook each time it appears in the source. But hooks are only documented once, with duplicate entries marked with a comment. We should ideally only store a single entry for each hook. The entry would then have metadata/something storing the specific data for each place the hook is used (file/function/method and line numbers).

The main issue is that right now post associations are done in a parent/child manner. Since a post can only have one parent, this will have to change. Posts 2 posts has been mentioned before.

Contributor guide

No contributing guide indexed for this repository

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 tracing how hook entries are stored and how post associations currently use the parent/child relationship. Define the replacement metadata for each hook occurrence and verify that one post is stored per hook while all file, function or method, and line-number locations remain represented.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.