bovigo / vfsStream

vfsStream is a stream wrapper for a virtual file system that may be helpful in unit tests to mock the real file system. It can be used with any unit test framework, like PHPUnit or SimpleTest.
BSD 3-Clause "New" or "Revised" License
1.42k stars 102 forks source link

pass options to stream wrapper #293

Open dwilbourne opened 2 months ago

dwilbourne commented 2 months ago

My appologies, this is a usage issue, not any sort of bug I encountered. It is also a result of some less-than-great streams documentation in the php manual, so I have tried my best to RTFM. If I could help write some documentation for vfsStream regarding this subject, I would be glad to.

I want to pass the STREAM_REPORT_ERRORS flag in when I call fopen on vfsStream object. But there is zero php documentation on how to set that flag. The options in the context array are of the form "option => value" and the flag IS a value, so I am lost. Your thoughts? Thanks in advance