Handling duplicate entries with the same parent ID
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- database, documentation
Research direction
Start by tracing the existing ID check for repeated hook calls and inspect how entries are matched against the postmeta table. Verify the behavior for repeated calls with different file or line metadata, and for same-named functions in separate files. Done means distinct metadata produces distinct entries while identical calls remain handled consistently.
Written by the indexing model from the issue text.
Description
When the same hook is called twice within the same function, the check for an existing ID will come up as true, even though the meta (e.g. line-number) will likely be different for the second call as the first call. Equally, if functions with the same name are defined twice, perhaps in the global namespace (parent ID = 0) in different files that are not included within the same request, they too will have different meta data and should be different entries.
Perhaps a join to postmeta table on the existing ID check and also compare the file and / or line number would narrow it down?
If the same hook is being called twice on the same line in the same file, well, that's just stupid! (But technically plausible.)
- Dominant language
- PHP
- Stars
- 239
- Forks
- 81
- Avg merge
- 16h 29m
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/phpdoc-parser
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
WordPress/phpdoc-parser#269 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
WordPress/phpdoc-parser#268 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
WordPress/phpdoc-parser#254 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WordPress/phpdoc-parser#246 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
WordPress/phpdoc-parser#235 · 1 comment ·
All issues in WordPress/phpdoc-parser
Similar issues
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#2161 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/static-site-importer#1824 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100