yiisoft / yiisoft/files

Glob based on PathMatcherInterface

Open
#46 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted status:under discussion type:feature
Dominant language
PHP
Stars
37
Forks
18
Avg merge
59m
Merged PRs (30d)
1

Description

$files = FileHelper::glob((new PathMatcher()->only('/var/www/yiiframework.com/**.jpg')));
  1. No need to specify directory such as in findFiles().
  2. Should support absolute paths only.
  3. Should determine non-dynamic part of the pattern /var/www/yiiframework.com/ and start matching from there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating FileHelper::glob() and PathMatcherInterface, including the PathMatcher usage shown in the example. Review how the current file matching determines its starting directory, then verify behavior for absolute patterns, the non-dynamic prefix, and the requested .jpg matching; add or update tests if the repository provides coverage for these APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.