Function name "__duplicate_post_main" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 53
- Forks
- 38
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
Hi,
I have executed a plug-in to check PHP compatibility and it report:
WARNING | Function name "__duplicate_post_main" is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
in this file: https://github.com/Yoast/duplicate-post/blob/trunk/duplicate-post.php
Contributor guide
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.
Research direction
Start in duplicate-post.php, where the reported __duplicate_post_main function is located, and inspect its definition and references. Rename it to avoid the reserved double-underscore prefix, then rerun the PHP compatibility check and confirm that the warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100