-
Notifications
You must be signed in to change notification settings - Fork 102
Known Issues
Luke edited this page Feb 19, 2020
·
18 revisions
Issues that exist because no one implemented them:
- missing support for
stream_set_blocking()
,stream_set_timeout()
andstream_set_write_buffer()
Issues that can not be fixed:
- Some PHP functions do not work with any other URLs than pure filenames, as they are just thin wrappers around the native C functions and therefore do not support userland stream wrappers like vfs. Currently these functions are known:
chdir()
realpath()
-
link()
,symlink()
,readlink()
,linkinfo()
SplFileInfo::getRealPath()
tempnam()
- There may be more - in case a function you use does not work correctly with vfsStream URLs check the PHP manual for this function if it mentions a similar native C function.
-
ext/zip
seems not to support userland stream wrappers, so it can not be used in conjunction with vfsStream -
is_executable()
on a vfsStream directory always returns false - this is a problem with PHP itself, see comments on the is_executable() manual page -
file_put_contents()
together withLOCK_EX
does not work with vfsStream URLs -
glob()
does not work, see issue #2. If you really needglob()
and want to test it with vfsStream, check out webmozart/glob. -
touch()
,chown()
,chgrp()
andchmod()
only work with PHP >= 5.4 because support of stream wrappers for those functions was first added with PHP 5.4, see issue #56. With PHP 5.3 an error with the message "Unable to create file vfs://... because No such file or directory" will be raised - If you set a modified time, you must call
clearstatcache()
in order forfilemtime()
to return the new value. - If you use an object with a destructor that opens a vfsStream URL, vfsStream can become unavailable before the open occurs, causing it to fail with a WARNING. E.g. in PHPUnit, make sure to manually destroy the object in the test or in
tearDown()
. -
stream_resolve_include_path()
does not resolve absolute vfsStream URLs. See vfsStreamResolveIncludePathTestCase.php about what does work with vfsStream URLs, though. - Setting ini key
'error_log'
to a vfsStream url doesn't work witherror_log('some message');
, as the underlying implementation in PHP doesn't respect stream wrappers. Usingerror_log('foo', 3, vfsStream::url('error/error.log'));
works, though. - On Windows, calls to
is_readable
,is_writable
, andis_executable
will always returntrue
for non-owner permissions. If owner has read/write/execute, so does everyone else. See issue 167 and pr 214 for more info.