|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67379 Not all implemented methods documented for some iterators
Submitted: 2014-06-04 08:08 UTC Modified: 2017-10-24 09:21 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: phpbugs at geniusdex dot net Assigned: salathe (profile)
Status: Assigned Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
43 - 13 = ?
Subscribe to this entry?

 [2014-06-04 08:08 UTC] phpbugs at geniusdex dot net
The documentation for some iterators does not contain all implemented methods. For example, the documentation for the following iterators do not include the valid() method, which is a required part of the Iterator interface:

- GlobIterator
- ParentIterator
- RecursiveCallbackFilterIterator
- RecursiveDirectoryIterator
- RecursiveRegexIterator
- RegexIterator
- RecursiveDirectoryIterator


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-04 09:22 UTC]
I think I see the problem. We only list inherited methods for one level of the inheritance tree. 

Take, for example, GlobIterator. We show its methods, and under "Inherited Methods" we list the methods its parent class (FilesystemIterator) implements.

We currently do not list methods inherited from grandparent classes. In this case, that would be DirectoryIterator, which is where the valid() method is implemented.

Perhaps we should convert this ticket to a feature request to list all inherited methods on each class's synopsis page.
 [2014-08-15 21:27 UTC]
-Assigned To: +Assigned To: salathe
 [2017-10-24 08:13 UTC]
-Status: Assigned +Status: Open -Assigned To: salathe +Assigned To:
 [2017-10-24 09:21 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: salathe
 [2017-10-24 09:21 UTC]
Re-assigning to me to keep visibility.
 [2018-01-28 13:18 UTC]
A complication is that there are many methods defined both in the parent and the grandparent, e.g. DirectoryIterator::current and FilesystemIterator::current.

Just including the grandparent (<xi:include xpointer="xmlns(db= xpointer(id('class.filesystemiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />) would list these methods twice.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 22 05:03:36 2023 UTC