chore: remove dead includes/pmid.php duplicate#39
Merged
Conversation
includes/pmid.php was a never-required, pre-refactor snapshot of the PMID resolver: its functions are duplicated (and now diverged) from the live copies in bibliography-builder.php, which moved to a renamed caching API (…_result) and renamed TTL constants. The file registered nothing and would cause redeclare + undefined-constant fatals if ever loaded. Verified no references in tests/composer/phpunit; full PHP + JS suites stay green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
=======================================
Coverage 81.47% 81.47%
=======================================
Files 40 40
Lines 2613 2613
Branches 464 464
=======================================
Hits 2129 2129
Misses 126 126
Partials 358 358 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
includes/pmid.php— dead, unreachable code.Why it's safe (verified):
requires/includes it; the main plugin file only requires the Composer autoload and the asset file.add_action, noregister_rest_route).bibliography-builder.phphas refactored past it: a renamed caching API (…get_cached_pmid_result/…cache_pmid_result/…pmid_error) and renamed TTL constants (…_SUCCESS_CACHE_TTL, etc.). The dead file still calls the old…_responsehelpers and references old constant names.Cannot redeclare function …plus undefined-constant errors.composer.json,phpunit.xml.dist, ortests/; its only-there cache helpers are called solely from within the dead file itself.Verification:
composer test:php(109 pass),lint:php,npm test(550 pass),lint:js,npm run build— all green after removal.This is the prerequisite cleanup referenced by the "leaner root plugin file" research backlog (#38).
🤖 Generated with Claude Code