Skip to content

Conversation

@dlh01
Copy link
Member

@dlh01 dlh01 commented Nov 20, 2025

Reverts #19, restores #18.

@dlh01 dlh01 requested a review from Copilot November 20, 2025 05:03
Copilot finished reviewing on behalf of dlh01 November 20, 2025 05:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR restores experimental support for matching WordPress blocks using XPath queries by reverting the changes from #19 and re-introducing the feature from #18. The implementation adds a new __experimental_xpath parameter to the match_blocks() function that allows complex block queries through XPath syntax.

Key changes:

  • Adds __experimental_xpath parameter to enable XPath-based block matching
  • Introduces XML serialization/deserialization for blocks using Symfony Serializer
  • Includes comprehensive documentation and test coverage for the XPath feature

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/match-blocks.php Adds XPath query support by serializing blocks to XML and deserializing matched results
src/internals/class-block-normalizer.php Implements normalization/denormalization for individual blocks to/from XML
src/internals/class-blocks-normalizer.php Implements normalization for collections of blocks to XML
src/blocks/class-matched-blocks.php New class that implements Serialized_Blocks interface for matched block collections
tests/Unit/MatchBlocksExperimentalXPathTest.php Test coverage for XPath query functionality
tests/Unit/Blocks/MatchedBlocksTest.php Test coverage for Matched_Blocks class
composer.json Adds dependencies for XML serialization (symfony/serializer, ext-simplexml, wp-type-extensions)
README.md Documents XPath feature usage, limitations, and XML structure
CHANGELOG.md Documents the interface name mismatch in version 4.3.0
.github/workflows/all-pr-tests.yml Adds PHP 8.4 to the test matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlh01 dlh01 requested a review from Copilot November 20, 2025 05:34
Copilot finished reviewing on behalf of dlh01 November 20, 2025 05:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants