rfc:glob_streamwrapper_support
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:glob_streamwrapper_support [2022/09/19 15:48] – timint | rfc:glob_streamwrapper_support [2022/10/24 13:50] (current) – timint | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: StreamWrapper Support for glob() ====== | ====== PHP RFC: StreamWrapper Support for glob() ====== | ||
+ | |||
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2022-08-15 | * Date: 2022-08-15 | ||
Line 5: | Line 6: | ||
* Status: Under Discussion | * Status: Under Discussion | ||
* First Published at: https:// | * First Published at: https:// | ||
+ | |||
+ | **Status: Aborted** | ||
+ | |||
+ | **Comment: This RFC has been aborted as no convenient solution or workaround was found for Alpine platform. / Timmy** | ||
===== Introduction ===== | ===== Introduction ===== | ||
Line 25: | Line 30: | ||
open_basedir check will be removed from result filtering in favour of the already new implemented one in wrapper' | open_basedir check will be removed from result filtering in favour of the already new implemented one in wrapper' | ||
- | If a StreamWrapper supports listing contents, it will supported by glob(). There will be edge cases where a streamwrapper is not intended to or does not support listing contents of a resource, e.g. http://, data://, compress.zlib: | + | If a StreamWrapper supports listing contents, it will supported by glob(). There will be edge cases where a streamwrapper is not intended to or does not support listing contents of a resource, e.g. http:, data:, compress.zlib: |
- | We can put a word of advice in the documentation that clearifies how glob() will not work with these edge case wrappers. But again, this applies to the current implementation of scandir() | + | Which streamwrapper that can be used with glob() is not a limitation of glob(), but the streamwrapper itself. PHP's current ftp streamwrapper might not support listing files in a directory, but a 3rd party wrapper for ftp might. |
+ | |||
+ | A word of advice | ||
===== Unaffected PHP Functionality ===== | ===== Unaffected PHP Functionality ===== | ||
Line 33: | Line 40: | ||
Wrappers not intended to return a list of contents will continue returning an empty array as glob does today. | Wrappers not intended to return a list of contents will continue returning an empty array as glob does today. | ||
+ | |||
+ | Edit (Oct 2): As noted by @bukka; the use of GLOB_ALTDIRFUNC is a non-standard implementation that doesn' | ||
===== Future Scope ===== | ===== Future Scope ===== |
rfc/glob_streamwrapper_support.1663602503.txt.gz · Last modified: 2022/09/19 15:48 by timint