Tuesday, June 8. 2010
As promised in my talk about vfsStream at the International PHP Conference Spring Edition last week (see slides on slideshare) I released vfsStream 0.7.0 today. This release features two additions: an improvement for support of file permissions resulting from a bug fix, and an API improvement for simpler setups of test cases using vfsStream.
The improved file permissions support now respects file permissions when you access files and/or directories. Until now it was possible to write into a non-writable file or to read from a non-readable file. This is not possible any more, vfsStream enforces file permissions now in every situation. This allows you to create tests to check how your application responds if it does not have correct file permissions on a directory, for example. Please test this change, I'm not sure I got it completely right.
With the API improvement it becomes much simpler to write the setup method for test cases using vfsStream. Before 0.7.0 you had to write something like this:
Starting with 0.7.0 this can be simplified into a single method call:
Still you can have all the flexibility you need. The vfsStream::setup() has the same arguments as vfsStream::newDirectory(), namely name and permissions for the new directory, defaulting to 'root' and 0777. Additionally, the method returns the newly created root directory so that you can use it to do further adjustments as required.
If you like the new additions get the new release.
Wednesday, March 17. 2010
Today we released Stubbles 1.1.1. This is a bugfix release, addressing three issues we found with 1.1.0: It turned out that the database bindings delivered within the framework are not sufficient for every use case. Therefore we rewrote net::stubbles::rdbms::ioc::stubDatabaseBindingModule to fit for new requirements, and removed the deprecation status of this class. However, if you still use XML config files for database connections you need to set the correct database initializer class via the new method stubDatabaseBindingModule::setDatabaseInitializerClassName() to net::stubbles::rdbms::stubDatabaseXJConfInitializer.
The other two bug fixed resort around the build files provided with Stubbles releases: PHP_CodeSniffer introduced a bc break with bugfix release 1.2.2. We adjusted the check-style target to be compatible with this version. Additionally we fixed the setup-examples target, which was broken due to the change of how the projectdir attribute is evaluated since Phing 2.4.0, and slipped through in 1.1.0 when we did the change to this Phing version.
As always, you can get the release from our downloads page.
Sunday, March 7. 2010
This weekend we shipped the fresh Stubbles 1.1.0 release to our downloads page, bringing one or the other great new feature to our users. This includes but is not limited to full support for dependency injection on interceptors, delayed logging, support for providing REST services, and several more improvements which allow simpler usage of Stubbles by supporting dependency injection on even more places throughout the framework.
Such improvements can be seen on the example of how the usage of databases had to be enabled in Stubbles 1.0.0 and how it could be done with 1.1.0: With 1.0.0 you had to configure the database connections in a config file, and you had to add the stubDatabaseBindingModule to the list of binding modules which configure the binder. Now in Stubbles 1.1.0 the last step is not necessary any more, you only require a config file (which, btw, changed from XML to ini format), and after the config file is there you can start in your application classes to get database connection or entity manager instances injected. This works because we added annotations to the framework classes, so that the framework provides a usable default binding without the need to explicit specify these defaults by the user. However, if the default bindings do not satisfy a user's needs he still can configure his own database bindings using his own binding module. Convention over configuration, sort of.
Get the release from our downloads page, for a full list of changes see the changelog.
Monday, February 15. 2010
Seldom in a life of a developer it comes to the point where a bug can be fixed by a feature addition. This February, it happend to vfsStream. A user reported a bug where overwriting an existing vfsStream file with new but smaller content replaced only portions of the file, leaving the rest in place instead of truncating the old content before writing the fresh content. After some investigation it turned out the best fix for the problem was to implement the long scheduled feature issue 7. Thought, said, done. So today I shipped vfsStream 0.6.0 including complete support for for $mode param when opening files.
While I was at it, I added support for the $options param as well, it now evaluates whether STREAM_REPORT_ERRORS is set and acts accordingly when opening a file.
Unfortunately there are bad news as well. Due to another issue I found out that ext/zip does not work with vfsStream, and that there is no way to add support for it in vfsStream. Maybe if someone with slightly more C skills than me (which are equal to zero) might want to look into this problem for a better explanation, as I can only assume that it's due to ext/zip not supporting userland stream wrappers.
If you like the new additions get the new release.
Monday, January 25. 2010
Today I shipped vfsStream 0.5.0 which brings a new feature thanks to the efforts of Benoit Aubuchon: vfsStream now supports the rename() functionality which allows you to write test cases using vfsStream for methods that rename files. Another patch of him was to change the stat() call to respect the STREAM_URL_STAT_QUIET flag.
One more new feature is the added support for . as current directory alias so that vfs://foo/. resolves to vfs://foo - this allows to use file_exists($dir . '/.') as workaround for the failing is_executable() call on directories, as described in the comments to the is_executable() documentation in the PHP manual. Of course this raises the question if vfsStream will support .. as well - if somebody takes the time to create a patch I will incorporate this. I did not look into this issue further, but I guess it might involve recursion and a more advanced parsing of the vfs URL to make it work properly, as there might be cases like vfs://foo/bar/baz/../../dummy.
So grab the release and make use of the new features, if you like to.
Wednesday, December 30. 2009
Some minutes ago we released Stubbles 1.0.2. This is a bugfix release, containing the following fixes:
You can get the release from our downloads page.
Thursday, November 5. 2009
Some minutes ago we released Stubbles 1.0.1. This is a bugfix release, containing the following fixes:
We encourage all users to upgrade due to a security issue with 1.0.0 with route names where the validation of the selected route name was not done properly. You can get the release from our downloads page.
Monday, October 19. 2009
This weekend we released Stubbles 1.0.0 as the first non-alpha/non-beta version, recommended for production usage. We decided to drop all view engines except the XML/XSL one as we recommend only using this. The Memphis view engine using patTemplate was just a heavy steel ball on our feets, and our decision to drop it manifested in the way that we were able to improve Dependency Injection support all over the way for the XML/XSL view engine.
Further improvements compared to the last release focused on the command line support. Now you can write your script as implementation of the net::stubbles::console::stubConsoleCommand, using Dependency Injection in all places, and run the command with our new stubcli script which is capable of running all net::stubbles::console::stubConsoleCommand implementations.
The filter API saw a major rework making it simpler then ever to apply filters to input values. We will improve the validator API in the same way with the 1.1.0 release.
Of course several bug fixes found their way into the release. See changelog for a complete list of changes. You can get the release from our download pages.
Unfortunately the documention is not complete. If you have questions just open tickets, we will address documentation issues then.
What's next? We have planned bugfix releases for 1.0.0 if necessary. Additionally we already planned the 1.1.0 release. See list of tickets for milestone 1.1.0 on what we have planned.
Monday, July 13. 2009
Some minutes ago I released vfsStream 0.4.0, introducing support for file modes, owners and groups. While I planned to implement this at least since a year it took me three tries to get it implemented, and while implementing this I stumbled about some issues which can not be solved by vfsStream. Major problem is that the PHP functions chmod(), chown() and chgrp() do not work with vfsStream URLs due to limitations imposed by PHP (or possibly by underlying C, not sure). The stream wrapper API has no support to enable setting file modes, owner or group of a userland stream implementation. This means the usage of file mode support is limited and can not be applied to create tests for classes using one of the three functions. However, it is still possible to use file modes for testing correct usage of is_readable(), is_writable() and is_executable(). Another usage scenario is to make sure directories created with mkdir() receive the correct file mode, see the file mode example. I'm sure users will come up with other usage scenarios I did not even thought of.
Beside this new feature the release contains a bugfix for vfsStreamDirectory::addChild() to make sure adding another child of the same name as an existing child replaces this existing child, and a fix to return correct results for stat() calls. Grab the release via it's pear channel pear.php-tools.net and try it out. I suspect the file mode support may contain bugs because I did not have the time to use it in other projects, but after all, it is still in alpha stage.
Wednesday, June 10. 2009
Last night we released Stubbles 0.16.0 which is mainly a bugfix release but still contains some new stuff. Most remarkable of the new stuff is the native support of Iterator instances to behave as arrays when serialized with the XMLSerializer. Another interesting feature is the possibility to configure the xml generators to be used by the XMLProcessor of the XML/XSL view engine, which allows you to add your own xml generator and have arbitrary data available on the dom tree of every page.
For the command line folks we added the possibility of asynchronous command line execution with the Executor. This way one can issue several commands at once and wait until they are processed while doing other things in the meantime.
Bug fixes focused on the input grid support, making it more usable for everyday usage of forms. For a full list of changes see the changelog.
On another note, this is the last minor release which contains the Memphis and Rasmus view engines. We will discontinue them in trunk and the next minor release will not contain them. However, we will do bugfix releases for the 0.16.x series if necessary and keep the support for 0.16.x until our own applications are migrated to the XML/XSL view engine later this year, meaning that support will be available at least until December 31st 2009.
Monday, April 6. 2009
New month, a new release: 0.15.0. On the last release 0.14.0 I said the next release will most likely be 1.0.0. Turned out, it is not. We don't have a new release date for 1.0.0 yet, as this highly depends on our demand to have its XML/XSL view engine proven in reality, which we do not have a new date for yet.
Beside this, the release brings some new stuff: One could have more then one master.xsl in the XML/XSL view engine now, which means the stylesheet for generating the stylesheet is now highly extensible by custom templates. We improved the net::stubbles::service::soap package by fixing inconsistencies and made it usable in conjunction with our Inversion of Control feature. Speaking about Inversion of Control, we added the @ProvidedBy annotation which can be added to interfaces and classes to declare the default injection provider for those types. This is similar to the @ImplementedBy annotation, but offers more possibilities on what has to be done to construct the requested object.
For a complete list of changes consult our changelog.
Monday, March 9. 2009
Some minutes ago we released Stubbles 0.14.0. Most likely this is the last release before 1.0.0, which is schedules for end of March or early April, depending on how many bugs we will find until then. But back to the current release, what's new?
Most of the other changes are improvements of the Inversion of Control feature rework we did with 0.13.0, one is that there is no need any more to explicitly bind the mode, as this is an optional dependency now. Additionally, the net::stubbles::lang::stubMode class is now an interface, allowing users to have their own mode implementations. The implementation delivered with Stubbles can now be found in net::stubbles::lang::stubDefaultMode. Additionally it is now possible to create an application without binding the logger, all dependencies to it were changed to be optional.
As always, for a complete list of changes see the changelog.
Monday, February 16. 2009
Nearly about a year passed since the last release of vfsStream, and some bugs were found by users of vfsStream. This was quite a surprise for me since I did not expect that anybody would use it.
This evening I fixed another bug reported some days ago, and since a patch for another bug was submitted and committed about half a year ago I decided to release version 0.3.2 tonight, so these are the changes:
- added support for trailing slashes on directories in vfsStream urls, patch provided by Gabriel Birke
- fixed bug #4: vfsstream can only be read once, reported by Christoph Bloemer
- enabled multiple iterations at the same time over the same directory
A big thank you to the bug reporters for their help to improve vfsStream. This should give me some motivation to go for 0.4.0 and implement support for file modes, at least being able to store and read them - full file mode support will be a hell of a work, not sure if it is worth the effort.
Monday, February 9. 2009
Today we released Stubbles 0.13.0. This release is a major breakthrough regarding integration of the Inversion of Control functionality. All web applications build with Stubbles can now be created via our Inversion of Control features, resulting in less code for the same power. In Stubbles this means we were able to throw away around 200 lines of code without loosing any functionality. Moreover, we got only slight performance penalties regarding runtime in our applications (around 0.01 seconds more), but experienced less memory usage (up to 512 K) especially in situations were we heavily relied on XJConf configurations before.
Beside this the release contains bugfixes and feature improvements. As always take a look at the changelog. However, don't look too much into our current documentation, it still needs to be updated to reflect the latest changes.
Tuesday, December 16. 2008
Some minutes ago we released Stubbles 0.12.0, containing various API improvements and bugfixes. Most notable changes are the introduction of the bootstrap.php file and the net::stubbles::lang::stubPathRegistry class, which in combination replace the old stubConfig file. This is a major improvement especially for command line scripts, as you may now change the pathes for cache, configuration, log and page data files during runtime, allowing a better way to create maintenance scripts for example.
The other new feature is the introduction of the input grid for the XML/XSL view engine, mainly contributed by Andreas Lehr. This feature allows fine-grained control over forms and their elements, ranging from placement of label elements and input fields to special information markers, but creates valid HTML markup as output. If used in conjunction with the delivered ingrid.css file you will get very fast valid and accessible forms. Unfortunately the documentation for this feature is still missing, but we hope to provide this soon.
For a full list of changes see the changelog.