Skip to content
mikey179 edited this page Oct 26, 2014 · 18 revisions

Known issues

Issues that exist because no one implemented them:

  • missing support for stream_set_blocking(), stream_set_timeout() and stream_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 with LOCK_EX does not work with vfsStream URLs
  • glob() does not work, see issue #2
  • touch(), chown(), chgrp() and chmod() 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 for filemtime() 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().
Clone this wiki locally