Extending include path to support stream wrappers
| From: | P) | Date: | Mon, 10 Jul 2006 14:40:18 +0000 |
| Subject: | Extending include path to support stream wrappers | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-24307@lists.php.net to get a copy of this message | ||
Hello,
I am currently implementing a packaging tool in PHP. If you know PHAR, it is the same kind of tool,
which allows to implement a virtual file tree in a single physical file.
In such a tool, every file path becomes a 'stream-wrapped' path and the problem comes from
the difference in the way PHP handles these paths relatively to 'plain' paths, especially
the fact that a 'stream-wrapped' path cannot be part of the include path.
The first reason is that the ':' character is used by the stream wrapper and, also, as the
Unix path separator. This one would be easy to solve, but it would be useless because the engine
dispatches its 'open' requests to the wrappers before searching through the include paths.
And, the include path is searched in the 'plain' wrapper code.
I have proposed some ideas to correct this behavior as a 'Feature request' at http://bugs.php.net/bug.php?id=38006. Could you
please comment on it ? Even if you think that it is total nonsense or a loss of time, I would really
appreciate to have your opinion on this subject before starting to modify anything.
Thanks & regards
François
PS: If we can solve this issue, I have the same for you (maybe more complex) about stream wrapper
support in chdir/getcwd, and then the glob/fnmatch issue ;-)