Closed michielroding closed 9 years ago
We can't change isAbsolute()
to return true
- that would be wrong, as a URI is not an absolute path. We could however change Glob
to support both absolute paths and URIs, which would solve your problem - right?
Yes it would!
Stream wrapper support is in 2.0-dev now.
Thanks! I'll try it out asap.
I have a backuptool that uses a directory structure to store files, e.g.:
/my/path/to/backupfiles/year/month/day/filename.ext
I'd like to unittest my code, so I'm looking into e.g. vfsStream to emulate the expected (and unexpected) structure.
I generate a glob pattern somewhere that is used to find files relating to certain servers, backup types (sql/files/etc) etc. php's glob() works fine in production but doesn't work well with vfsStream; webmozart\glob looks promising but doesn't work well with streamwrappers such as vfsStream.
I found Path::isAbsolute() to be the culprit; if I simply return true, the code works fine otherwise.