Skip to content

chore: remove dead includes/pmid.php duplicate#39

Merged
dknauss merged 1 commit into
mainfrom
chore/remove-dead-pmid-duplicate
Jun 17, 2026
Merged

chore: remove dead includes/pmid.php duplicate#39
dknauss merged 1 commit into
mainfrom
chore/remove-dead-pmid-duplicate

Conversation

@dknauss

@dknauss dknauss commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Removes includes/pmid.php — dead, unreachable code.

Why it's safe (verified):

  • Never loaded — nothing requires/includes it; the main plugin file only requires the Composer autoload and the asset file.
  • Registers nothing — only an ABSPATH guard + 5 function definitions (no add_action, no register_rest_route).
  • Superseded — the live PMID resolver in bibliography-builder.php has 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 …_response helpers and references old constant names.
  • Latent fatal — if it were ever loaded it would throw Cannot redeclare function … plus undefined-constant errors.
  • No references in composer.json, phpunit.xml.dist, or tests/; 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

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

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.47%. Comparing base (710b7aa) to head (ee319c8).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dknauss dknauss merged commit 4167303 into main Jun 17, 2026
15 checks passed
@dknauss dknauss deleted the chore/remove-dead-pmid-duplicate branch June 17, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant