Friday, October 8. 2010
vfsStream 0.8.0 released
With the release of vfsStream 0.8.0 the status is now beta instead of alpha as it was before. New features include a umask simulation which allows you to set a umask for vfsStream URLs which is then applied for new directories and files, except if you explicitly set the permissions of a file or directory using the vfsStream API. To be backward compatible and easier to use the default umask is 0000 - so if you are not interested in using this feature just don't use it and everything stays at it is.
Another new feature is the support of .. in URLs, provided via patch by Guislain Duthieuw, which means you can now have constructs like vfs://root/path/../otherpath which is mapped to vfs://root/otherpath. However, realpath() still doesn't work - there is no way to make this work with how realpath() is currently implemented in PHP itself. Besides this two bugs have been fixed, one where it was impossible until now to access a child of a directory via the vfsStream API if the child name is contained in the parent's name. The other one was an incomplete error message when you tried to access non-existing files on the root level. You can get the new release via our pear channel. ![]() Wednesday, September 29. 2010
Stubbles 1.3.0 and 1.4.0 released
Today we released Stubbles 1.3.0 and 1.4.0. First, what's new in 1.3.0? This release features a new API for the request interface which is much simpler to use. There are now separate methods for accessing parameters, cookies and headers, and the way to filter and validate request values was very much simplified. For more details on how the new API looks check the rewritten Wiki manual. All old methods are now deprecated.
Another change is the replacement of XML configuration via XJConf for error messages and route configurations. Both are now configured via property files. The old way of configuration via XML files is still available but has to be explicitly activated. However, it is deprecated as well. This is in compliance with our strategy to remove the dependency to XJConf from Stubbles. Up to 1.2.0 we shipped minified versions of the JavaScript files delivered with the release. Starting with 1.3.0 we don't ship those any more, instead we recommend the usage of Minify which will take care of minification, and much more you would like to have in you application, like using 304 status codes, compression and pulling all JavaScript files in one request. The REST processor now supports filter annotations for REST method parameters. This is useful to validate such input values in the surrounding code, and to keep the business code of the REST method free from validation code. In several different classes we added various methods for easier usage. See the changelog for a complete list of changes. What's new in 1.4.0? Well, not that much. Basically, 1.4.0 is the same as 1.3.0, but with all code removed which became deprecated in 1.3.0. So, which version should you upgrade to? If you want to upgrade fast and only want to profit from bugfixes we recommend upgrading to 1.3.0 and activate the XML configuration. You might also want to change your route configuration files (and error message configuration files if you have any) into the new ini format. It is also recommended to upgrade to 1.3.0 before starting to migrate to the new request API. Upgrading to 1.4.0 should be done after all request API dependent code was migrated to the new methods and there are no calls to old methods left. We recommend to aim for migration to 1.4.0 as the next minor or major version will be based on 1.4.0 - deprecated and removed code will not return any more. Until we release the next minor or major version we will continue to support 1.3.0 as well as 1.4.0 which means bugfix releases will be done for both minor versions. ![]() Tuesday, September 14. 2010
State of annotations in the PHP world, revisited
Nearly two years ago back in November 2008 I wrote about the state of annotations in the PHP world. Today I want to take the chance to revisit this and find out if annotations are still present and used, or if they are not.
Review of old candidates Of those which I described two years ago, AttributeReader saw no further development, so I don't consider it as an option any more. Addendum has seen new releases, the last one in October last year. The repository has seen commits recently in June this year, so I believe it's not dead, but as it is feature complete there's of course not much development activity required any more. The third candidate was FLOW3. FLOW3 is still alive and kickin', nearing it`s final stable 1.0.0 release. Annotations are still part of the framework and the Introduction tutorial has usage examples of where you utilize annotations provided by the framework, for dependency injection and validation. The manual additionally lists persistence and even Aspect-Oriented Programming as usage scenarios. So as FLOW3 is likely to be adopted within the TYPO3 community we will see more and more FLOW3 based applications using annotations. Another framework is Stubbles. From what was stated in the first blog post nothing has changed, beside the fact that Stubbles is now available in version 1.2.0, with versions 1.3.0 and 1.4.0 shipping within the next two or three weeks. Stubbles is used in various applications at 1&1 Internet where we make heavy usage of the annotation features. The third framework mentioned was the XP framework. Current release is 5.7.11 with 5.8.0 right around the corner. For the annotation part nothing has changed, and XP framework is used to build the intranet of 1&1 Internet as well as a lot of internal tools. New kids on the block So, the three frameworks providing annotations are still alive. Question is, are there any new kids on the block? A little research reveals: yes, there are. One of them is Pia which provides annotations and an annotation API for PHP 5.3. It seems to be under active development and there seems to be no release yet. Nothing really usable yet, but recently a feature idea for annotation support within the Yii framework was brought up in their forums. Another one is the Recess! PHP Framework. Recess! uses annotations for routing and ORM. I did not find anything whether Recess! allows user-defined annotations or not. Then there is Symfony 2, currently scheduled for release in March 2011. Symfony integrates Doctrine 2 which uses annotations heavily to provide ORM features. It includes the Doctrine common annotations library which allows to define and access your own annotations. The inclusion of Doctrine 2 into Symfony 2 makes me very confident we will see a major usage boost of annotations in the PHP community. Conclusion In the first edition of this article I already speculated about the idea of having support for annotations within the language itself. Now there is an RFC for annotations including a patch which is discussed heavily on the PHP internals mailing list. Personally I would like to see this included in the PHP language, but it might be a long way ahead. It needs to fit into the language itself, and provide a syntax which integrates with the other parts of the language (though it might be noted that PHP is not very compliant in itself, but there's no need for history repeating). However, stating that there are no uses cases for annotations in PHP is simply not true. There won't be so much ideas about annotation support if it would be useless. As more and more implementations emerge, even ones which will boost the usage within the PHP community, I'm more than confident that annotations will become widely used in PHP. Providing support in the language would be a good way to give this a solid foundation. ![]() ![]() |
![]() ![]() Calendar
![]() Archives![]() Categories![]() Quicksearch![]() Syndicate This Blog![]() Blog Administration![]() ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||




