Skip to content

[4.x] Compact shard filter regex#1675

Open
oddvalue wants to merge 2 commits intopestphp:4.xfrom
oddvalue:feat/shard-filter-compression
Open

[4.x] Compact shard filter regex#1675
oddvalue wants to merge 2 commits intopestphp:4.xfrom
oddvalue:feat/shard-filter-compression

Conversation

@oddvalue
Copy link
Copy Markdown

@oddvalue oddvalue commented Apr 14, 2026

What:

  • Bug Fix
  • New Feature

Description:

Compresses the shard --filter regex by building a namespace trie and generating grouped patterns instead of flat alternation. This reduces filter length by up to 50% on large test suites.

For example, instead of:

Tests\\Unit\\Foo\\BarTest|Tests\\Unit\\Foo\\BazTest|Tests\\Unit\\QuxTest

The filter becomes:

Tests\\Unit\\(Foo\\(BarTest|BazTest)|QuxTest)

Related:

Follow-up to #1601 to be considered/merged after #1673

@oddvalue oddvalue changed the title 4.x] Compact shard filter regex [4.x] Compact shard filter regex Apr 14, 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