Skip to content

chore(api): Review ThemeCore API usage (JOOWP-253) - #9

Open
soulevilx wants to merge 5 commits into
developfrom
JOOWT-253-core-r5-1-review-which-api-symbols-the-t
Open

soulevilx wants to merge 5 commits into
developfrom
JOOWT-253-core-r5-1-review-which-api-symbols-the-t

Conversation

@soulevilx

Copy link
Copy Markdown
Contributor

Summary

Committed as be4417e (chore(api): Review ThemeCore API usage (JOOWT-253)). No runtime behavior changed. The report inventories the original 68 symbols, documents the five with in-scope consumers, and marks the remaining 63 @internal; the regenerated API baseline contains the five retained symbols.

  • docs/api/baseline-0.1.0.md — Regenerated from the final annotations.

  • docs/dev-reports/core-api-usage.md — Added the complete usage and disposition table.

  • packages/theme-core/src/Assets/Preloader.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/BlockRegistrar.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/CodeEnhancer.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/DynamicBlock.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/EditorBundle.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/FragmentBlock.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/HeadingAnchors.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/Html.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/PatternLoader.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/TemplateLocator.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Blocks/ThemeScheme.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/Acf.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/AdapterInterface.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/AdapterRegistry.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/Detector.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/Forms.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/Multilingual.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/Multilingual/Lang.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/Multilingual/Resolver.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Compat/PageBuilder.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Config/Manifest.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Container/ContainerException.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Container/ContainerInterface.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Container/NotFoundException.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/ContentProviderInterface.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/CategoryNode.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/Company.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/CompanyPage.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/ImageRef.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/PostCard.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/Profile.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/Model/Topic.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/NullProvider.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Content/WpContentProvider.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Http/CacheHeaders.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/I18n/JsStrings.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/I18n/Language.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/I18n/LanguageTagging.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/I18n/Languages.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/I18n/Translations.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Lazy/Decision.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Lazy/FragmentLazy.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Lazy/Policy.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Module/AbstractModule.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Module/ModuleInterface.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Performance/Fonts.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Performance/FragmentCache.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Performance/Images.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Breadcrumbs/Crumb.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Breadcrumbs/TrailBuilder.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Canonical.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Context.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/DescriptionBuilder.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Hreflang.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/RobotsBuilder.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Schema/Graph.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/Schema/Piece.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/SocialTags.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/TitleBuilder.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Seo/YieldPolicy.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Support/Hooks.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Support/ReadingTime.php — Changed the class docblock from @api to @internal.

  • packages/theme-core/src/Terminal/FsBuilder.php — Changed the class docblock from @api to @internal.

Why: The scoped production call-site review found consumer use for Kernel, Container, Settings, AssetManifest, and AssetRegistry. The report records the exact file references; no unapproved keep exception was made.

Jira

JOOWT-253

Acceptance criteria

  • AC1
  • AC2

Tests run (command and result)

Screenshots / recordings (UI changes)

Risks and rollback

Docs updated

  • Module docs / ADR / CHANGELOG as applicable

Test plan

  • Reviewed by Claude (AI Flow; developed by Codex)
  • CI green
  • QA on the pull request head

@soulevilx

Copy link
Copy Markdown
Contributor Author

Review by Claude

The usage claims check out against the consumer files. Kernel, AssetManifest, Settings, Container and AssetRegistry are used as described. The 63 other symbols have no production consumer.

  • AC1: Usage table covers all 68 baseline symbols with "used by" or "none". Evidence: docs/dev-reports/core-api-usage.md; the rg re-check of the theme, plugin and example directories matches the table.
  • AC2: Symbols with "none" were changed to @internal; no keep exceptions were made. Evidence: git diff of packages/ shows exactly 63 changed lines, each - @api → + @internal, and nothing else.
  • AC3: The table is saved as docs/dev-reports/core-api-usage.md.
  • Tests: docs/api/baseline-0.1.0.md was regenerated and lists exactly 5 symbols, matching the remaining @api annotations. The developer reports PHPStan, lint, PHPUnit (280 tests) and Vitest (318 tests) all passing. I did not re-run them. The change is docblock-only, so the risk is low.
  • Scope: Docblock and documentation changes only, with no behaviour change. 65 files changed: 63 PHP docblocks, the report and the baseline.
  • Security and secrets: Nothing sensitive is touched.
  • Conventional Commits: chore(api): Review ThemeCore API usage (JOOWT-253).
  • Deployment: None. No migration or configuration step is needed.
  • Owner approval (ticket says "Require human: Yes"): the owner still has to confirm the final public surface of 5 symbols. This is for the PR body and the owner, not a code defect.
    • The PR body should list the 63 @api → @internal changes, as the ticket's Technical section asks.
    • One point for the owner to weigh: Kernel::container() returns Container, but ContainerInterface is now @internal. This is consistent, since the concrete class is the one themes use.

Required fixes: None blocking. When the PR is opened, put the list of 63 annotation changes in its body, as the ticket requires.

VERDICT: PASS

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0bb51a66-a835-40d0-a21e-9d6b7ee0ae04
📥 Commits

Reviewing files that changed from the base of the PR and between 5e4998a and fbc53fa.

📒 Files selected for processing: 65
  • docs/api/baseline-0.1.0.md
  • docs/dev-reports/core-api-usage.md
  • packages/theme-core/src/Assets/Preloader.php
  • packages/theme-core/src/Blocks/BlockRegistrar.php
  • packages/theme-core/src/Blocks/CodeEnhancer.php
  • packages/theme-core/src/Blocks/DynamicBlock.php
  • packages/theme-core/src/Blocks/EditorBundle.php
  • packages/theme-core/src/Blocks/FragmentBlock.php
  • packages/theme-core/src/Blocks/HeadingAnchors.php
  • packages/theme-core/src/Blocks/Html.php
  • packages/theme-core/src/Blocks/PatternLoader.php
  • packages/theme-core/src/Blocks/TemplateLocator.php
  • packages/theme-core/src/Blocks/ThemeScheme.php
  • packages/theme-core/src/Compat/Acf.php
  • packages/theme-core/src/Compat/AdapterInterface.php
  • packages/theme-core/src/Compat/AdapterRegistry.php
  • packages/theme-core/src/Compat/Detector.php
  • packages/theme-core/src/Compat/Forms.php
  • packages/theme-core/src/Compat/Multilingual.php
  • packages/theme-core/src/Compat/Multilingual/Lang.php
  • packages/theme-core/src/Compat/Multilingual/Resolver.php
  • packages/theme-core/src/Compat/PageBuilder.php
  • packages/theme-core/src/Config/Manifest.php
  • packages/theme-core/src/Container/ContainerException.php
  • packages/theme-core/src/Container/ContainerInterface.php
  • packages/theme-core/src/Container/NotFoundException.php
  • packages/theme-core/src/Content/ContentProviderInterface.php
  • packages/theme-core/src/Content/Model/CategoryNode.php
  • packages/theme-core/src/Content/Model/Company.php
  • packages/theme-core/src/Content/Model/CompanyPage.php
  • packages/theme-core/src/Content/Model/ImageRef.php
  • packages/theme-core/src/Content/Model/PostCard.php
  • packages/theme-core/src/Content/Model/Profile.php
  • packages/theme-core/src/Content/Model/Topic.php
  • packages/theme-core/src/Content/NullProvider.php
  • packages/theme-core/src/Content/WpContentProvider.php
  • packages/theme-core/src/Http/CacheHeaders.php
  • packages/theme-core/src/I18n/JsStrings.php
  • packages/theme-core/src/I18n/Language.php
  • packages/theme-core/src/I18n/LanguageTagging.php
  • packages/theme-core/src/I18n/Languages.php
  • packages/theme-core/src/I18n/Translations.php
  • packages/theme-core/src/Lazy/Decision.php
  • packages/theme-core/src/Lazy/FragmentLazy.php
  • packages/theme-core/src/Lazy/Policy.php
  • packages/theme-core/src/Module/AbstractModule.php
  • packages/theme-core/src/Module/ModuleInterface.php
  • packages/theme-core/src/Performance/Fonts.php
  • packages/theme-core/src/Performance/FragmentCache.php
  • packages/theme-core/src/Performance/Images.php
  • packages/theme-core/src/Seo/Breadcrumbs/Crumb.php
  • packages/theme-core/src/Seo/Breadcrumbs/TrailBuilder.php
  • packages/theme-core/src/Seo/Canonical.php
  • packages/theme-core/src/Seo/Context.php
  • packages/theme-core/src/Seo/DescriptionBuilder.php
  • packages/theme-core/src/Seo/Hreflang.php
  • packages/theme-core/src/Seo/RobotsBuilder.php
  • packages/theme-core/src/Seo/Schema/Graph.php
  • packages/theme-core/src/Seo/Schema/Piece.php
  • packages/theme-core/src/Seo/SocialTags.php
  • packages/theme-core/src/Seo/TitleBuilder.php
  • packages/theme-core/src/Seo/YieldPolicy.php
  • packages/theme-core/src/Support/Hooks.php
  • packages/theme-core/src/Support/ReadingTime.php
  • packages/theme-core/src/Terminal/FsBuilder.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@soulevilx
soulevilx marked this pull request as ready for review October 20, 2026 01:30
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@soulevilx

Copy link
Copy Markdown
Contributor Author

QA by Claude: PASS at fbc53fa

All the checks passed, so I'm finishing with the checklist.

  • AC1: table of every @api symbol in docs/api/baseline-0.1.0.md with "used by" or "none". docs/dev-reports/core-api-usage.md has 68 symbol rows with a Used by column. That matches the 68 baseline entries (65 removed plus 5 kept, minus the 2 the original baseline lists in other sections). I grepped ThemeCore\ across themes/, plugins/ and docs/spec/examples. Non-test usage is only Kernel (both themes and BuyerOptions.php), AssetManifest (themes/jooservices/functions.php), Settings (BuyerOptions.php), and AssetRegistry and Container (through objects, as the report explains). The "none" rows agree with this. The remaining ThemeCore\ hits (TemplateLocator, PatternLoader, ThemeScheme, Manifest) are only in test files. The report excludes test files from consumption, which the ticket's list of consumers supports.
  • AC2: symbols with "none" become @internal, or are kept with an owner-approved reason. git diff origin/develop...HEAD -U0 -- packages shows exactly 63 - * @api lines and 63 + * @internal lines, with nothing else changed. No symbol was kept without a user, so there are no unapproved keep exceptions. Five @api symbols remain, and each has a consumer.
  • AC3: table saved as docs/dev-reports/core-api-usage.md. The file exists and has the columns Symbol, Kind, Source, Used by and Final annotation.
  • Test: php tools/api-list.php output matches the edited annotations. I ran scripts/docker/runtime php php tools/api-list.php | diff - docs/api/baseline-0.1.0.md. The two are identical (5 symbols: AssetManifest, AssetRegistry, Settings, Container, Kernel).
  • Test: PHPStan stays green. phpstan analyse -c phpstan-core.neon and -c phpstan-themes.neon (shared runtime) both report "No errors".
  • Scope: doc-block and analysis changes only, no behaviour changes. The package diff contains only the annotation swaps. The other changes are the baseline and the new report.
  • Owner approval of the kept symbols (ticket says "Require human: Yes"). This is not a code defect. The owner should confirm that the five retained @api symbols are acceptable, and that the 63 @api to @internal changes, which the PR body should list as a public-surface decision, are acceptable. I did not count this against the verdict.

The worktree is clean, and I created no artifacts.

VERDICT: PASS

@soulevilx soulevilx changed the title chore(api): Review ThemeCore API usage (JOOWT-253) chore(api): Review ThemeCore API usage (JOOWP-253) Oct 24, 2026
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