RecursiveRegexIterator insufficiently documented
Open
Nobody has claimed this yet.
bug
Extension: spl
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Description
For example, __DIR__ contain symfony/console.
<?php
$iterator = new RecursiveRegexIterator(
new RecursiveDirectoryIterator( __DIR__, RecursiveDirectoryIterator::UNIX_PATHS),
'/((?:[A-Z][a-zA-Z\d]+\/)*[A-Z][a-zA-Z\d]+)\.php$/',
RegexIterator::GET_MATCH,
RegexIterator::USE_KEY
);
Resulted in this output :
Matches all class files in directory and sub-directories
But I expected this output instead:
Matches all class files only in root directory
PHP Version
tested only in PHP 7.3
Operating System
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the RecursiveRegexIterator documentation and the supplied RecursiveDirectoryIterator example. Determine how recursion and the regex options should be explained, then update the relevant documentation so the iterator's matching scope and expected output are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100