<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Stubblog - vfsStream</title>
    <link>http://www.stubbles.org/</link>
    <description>Less slogan, more code.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1 - http://www.s9y.org/</generator>
    <pubDate>Wed, 09 Jan 2008 13:36:57 GMT</pubDate>

    <image>
        <url>http://www.stubbles.org/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Stubblog - vfsStream - Less slogan, more code.</title>
        <link>http://www.stubbles.org/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>vfsStream 0.3.0 and good bye SimpleTest</title>
    <link>http://www.stubbles.org/archives/39-vfsStream-0.3.0-and-good-bye-SimpleTest.html</link>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/39-vfsStream-0.3.0-and-good-bye-SimpleTest.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=39</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=39</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Against my intent of starting to work on file modes for 0.3.0 I decided that it is time to get an own repository for &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=272&amp;amp;entry_id=39&quot; title=&quot;http://vfs.bovigo.org/&quot;  onmouseover=&quot;window.status=&#039;http://vfs.bovigo.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;vfsStream&lt;/a&gt; in order to maintain it independently from Stubbles, which was the perfect reason to open a new project on Google Code. I will see if this proves to be a good solution for day to day development.&lt;br /&gt;
&lt;br /&gt;
The movement also marked the reason to try PHPUnit because I wanted to make use of its code coverage and its software metrics features. Especially the last one showed me a bunch of points that required refactoring before starting something big like supporting file modes. During refactoring some improvements made it into the code which justified a new release: vfsStream now supports rmdir(), and I made some API changes. I dropped vfsStreamDirectory::ceate() in favor of vfsStream::newDirectory() to be equivalent to vfsStream::newFile(). Additionally there is a new vfsStreamContent::at() method now, which allows to write code like this:&lt;br /&gt;
&lt;code&gt;
$parentDir = vfsStream::newDirectory(&#039;newdir&#039;)-&gt;at(vfsStreamWrapper::getRoot());
$file = vfsStream::newFile(&#039;file.txt&#039;)-&gt;withContent(&#039;foo&#039;)
                                      -&gt;lastModified(time() - 86400)
                                      -&gt;at($parentDir);
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
So far I&#039;m very satisfied with the software analysis features of PHPUnit that I&#039;m thinking very hard about saying good bye to SimpleTest in my other projects. Given the current state of SimpleTest&#039;s development I do not expect to get similar features in SimpleTest any time soon, and unfortunately I do not have the time to contribute to SimpleTest even if it would be a lot of fun I guess. 
    </content:encoded>

    <pubDate>Wed, 02 Jan 2008 23:46:00 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/39-guid.html</guid>
    
</item>
<item>
    <title>vfsStream 0.2.0 released</title>
    <link>http://www.stubbles.org/archives/37-vfsStream-0.2.0-released.html</link>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/37-vfsStream-0.2.0-released.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=37</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Having done more work on &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=257&amp;amp;entry_id=37&quot; title=&quot;http://vfs.bovigo.org/&quot;  onmouseover=&quot;window.status=&#039;http://vfs.bovigo.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;vfsStream&lt;/a&gt; I felt it is time to do the next release before starting to work on the next big issue&amp;#8482;. The new 0.2.0 release focuses on API improvements as well as support for differentiating between directories and files. API improvements are a new vfsStream::url() method to assist in creating correct vfsStream urls. Up until now you had to write something like&lt;br /&gt;
&lt;code&gt;$url = vfsStreamWrapper::PROTOCOL . &#039;://path/to/file.txt&#039;;&lt;/code&gt;&lt;br /&gt;
which is kind of ugly and unhandy to type. Now you can do&lt;br /&gt;
&lt;code&gt;$url = vfsStream::url(&#039;path/to/file.txt&#039;);&lt;/code&gt; which should be easier and less to type.&lt;br /&gt;
Another API improvement is the new vfsStream::newFile() method to be able to do&lt;br /&gt;
&lt;code&gt;$file = vfsStream::newFile(&quot;foo.txt&quot;)-&gt;withContent(&quot;bar&quot;);&lt;/code&gt;&lt;br /&gt;
Following an advice by David Zülke I changed vfsStreamWrapper::register() to reset the directory root to null.&lt;br /&gt;
&lt;br /&gt;
Additionally vfsStream now supports is_dir(), is_file() and is_readable(). However there is still a small drawback to is_readable(), as long as file mode is not supported existing pathes will lead to true, and non-existing pathes to false. Currently all files and directories always have 0777 as file mode. As I require support for file modes now this will be part of the 0.3.0 release.&lt;br /&gt;
&lt;br /&gt;
Another thing I found during the last days is that realpath() seems only to work with real files, but not with any other URL types. That&#039;s a bit sad because it means one can not use this function if one wants to test its file operations with vfsStream. 
    </content:encoded>

    <pubDate>Sat, 29 Dec 2007 14:33:58 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/37-guid.html</guid>
    
</item>
<item>
    <title>vfsStream 0.1.0 released</title>
    <link>http://www.stubbles.org/archives/36-vfsStream-0.1.0-released.html</link>
            <category>Planet PHP</category>
            <category>vfsStream</category>
    
    <comments>http://www.stubbles.org/archives/36-vfsStream-0.1.0-released.html#comments</comments>
    <wfw:comment>http://www.stubbles.org/wfwcomment.php?cid=36</wfw:comment>

    <slash:comments>8</slash:comments>
    <wfw:commentRss>http://www.stubbles.org/rss.php?version=2.0&amp;type=comments&amp;cid=36</wfw:commentRss>
    

    <author>nospam@example.com (Frank Kleine)</author>
    <content:encoded>
    Some minutes ago I released the first version of &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=258&amp;amp;entry_id=36&quot; title=&quot;http://vfs.bovigo.org/&quot;  onmouseover=&quot;window.status=&#039;http://vfs.bovigo.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;vfsStream&lt;/a&gt;. 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 &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=259&amp;amp;entry_id=36&quot; title=&quot;http://phpunit.de/&quot;  onmouseover=&quot;window.status=&#039;http://phpunit.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHPUnit&lt;/a&gt; or &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=260&amp;amp;entry_id=36&quot; title=&quot;http://simpletest.org/&quot;  onmouseover=&quot;window.status=&#039;http://simpletest.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;SimpleTest&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The first idea for this came up when I prepared my talk about stream wrappers for the &lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=261&amp;amp;entry_id=36&quot; title=&quot;http://phpconference.com/&quot;  onmouseover=&quot;window.status=&#039;http://phpconference.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHP conference&lt;/a&gt; in Frankfurt-Mörfelden earlier this year (&lt;a href=&quot;http://www.stubbles.org/exit.php?url_id=262&amp;amp;entry_id=36&quot; title=&quot;http://downloads.stubbles.net/&quot;  onmouseover=&quot;window.status=&#039;http://downloads.stubbles.net/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;slides still available&lt;/a&gt;). Everybody knows that you should not use real databases in unit tests, so why should one use the real file system? Of course you can create an IO abstraction layer, but PHP offers such easy access to file contents via its file_get_content() and file_put_content() functions as well as with its other file system functions that it would be a bit overdone to create such a layer just for testing purposes. Additionally there are stream wrappers which allow you to create your own protocol and use it with exactly this file functions.&lt;br /&gt;
&lt;br /&gt;
This was the point where I started thinking about it, so hacked together a first version as a prove-of-concept. Because it worked like a charm I started to use it in my own unit tests, which already saved me some time and problems. Today I decided it is time to release this as open source to the public to see if other people like the idea and have a use for it, therefore I did some refactorings, and did a first release. Unfortunately not everything works by now: It is currently not possible to rename a file or directory, and it is not possible to remove directories. Additionally file modes are completely ignored. The main reason for this is that I did not need one of this features until now. Feel free to send patches, wait until I have a need for it or beg me to implement them. &lt;img src=&quot;http://www.stubbles.org/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Fri, 14 Dec 2007 00:31:31 +0100</pubDate>
    <guid isPermaLink="false">http://www.stubbles.org/archives/36-guid.html</guid>
    
</item>

</channel>
</rss>