Skip to content

Add a same-identifier merge option - #10

Merged
xavierlacot merged 2 commits into
mainfrom
feat/merge-option
Nov 13, 2026
Merged

xavierlacot merged 2 commits into
mainfrom
feat/merge-option

Conversation

@xavierlacot

@xavierlacot xavierlacot commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Blocks sharing an identifier (a JSON-LD "@id", a microdata "itemid") are now merged into one audit item, as Google does, behind a new mergeNodesSharingAnIdentifier option of Validator::audit() that is on by default (--no-merge in the CLI).

Audit::getItems() exposes one item per node with its source blocks, which keep their own audit, and values the blocks disagree on become a Merge warning of the item. The former withdrawal of resolved errors from the blocks is removed, and the baseline task now audits the fixtures exactly as the tests do.

Checklist

  • Tests pass (castor qa:phpunit:run)
  • Coding standards applied (castor qa:cs)
  • Static analysis passes (castor qa:phpstan)
  • Tests added or updated for the change
  • Documentation updated if needed

@xavierlacot xavierlacot changed the title Feat/merge option Add a same-identifier merge option Nov 13, 2026
@xavierlacot
xavierlacot merged commit c2a00d6 into main Nov 13, 2026
4 checks passed
@xavierlacot
xavierlacot deleted the feat/merge-option branch November 13, 2026 17:30
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