Skip to content

Support recursive globstar in path repositories - #13107

Open
truongbo17 wants to merge 1 commit into
composer:mainfrom
truongbo17:feat/recursive-path-repository-glob
Open

truongbo17 wants to merge 1 commit into
composer:mainfrom
truongbo17:feat/recursive-path-repository-glob

Conversation

@truongbo17

Copy link
Copy Markdown
Contributor

Fixes #12461.

PHP's glob() treats ** like a single *, so a path repository such as modules/** misses packages nested more than one directory deep. This change expands a standalone ** path segment over zero or more directories while retaining the existing glob behavior for the remaining path. It supports multiple recursive segments, deduplicates matches, and keeps their order deterministic.

The regression test covers a nested package, a trailing **, a package directly under a **/name pattern, and multiple recursive segments. The reproducer from the issue now resolves the nested package.

Local checks:

  • PathRepositoryTest: 10 tests, 34 assertions passed.
  • PHPStan (PHP 8.4): no errors.

@Seldaek Seldaek added this to the 2.12 milestone Oct 5, 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.

Support ant glob syntax (**) in path repositories

2 participants