100th revision to the OPL repository
The Subversion repository has been used in OPL development for ages. However, for the first six months, Open Power Template 2 had to deal without any version control system due to the movement to the new group and abandoning the old network infrastructure. The first revision to the new repository was committed on 30th June 2008 and was relatively poor - in other words, nothing worked. In the last few months the use of the repository has significantly increased, providing the users the freshest versions of the source code and the documentation. Only in the last two weeks, there were 14 new revisions.
The 100th commit has been made to the OPL library. It includes the newest improvements to the autoloader and the PHAR builder.
New OPL autoloader
Recently, I have been corresponding with Amadeusz Starzykiewcz about the OPL autoloader improvements. We decided that it would be the best to make it more a general-purpose autoloading tool that suits not only OPL needs, but other libraries (i.e. Doctrine and Zend Framework) as well. The result is visible as the improved API with many limitations removed. The most significant changes are:
- The autoloader can handle any library using the
Foo_Bar_Joeclass naming style.
- The library-specific autoloading needs have been moved to the extra handler. Different libraries may use different handler or not use any.
- Improved library configuration with
- Added performance-tuning methods.
- The special handler for PHAR-s is present.
The full PHAR support has been one of the primary goals for a long time. However, for most of the time, there were other priorities that must have been done, but finally there appeared the PHAR builder in the repository. It allows to produce a fully-functional PHAR from any OPL library. The archive is self-configurable and contains only the executable code. The PHAR-s will be available to download from our website together with the ordinary distribution packages.
The installation and usage of PHAR-s is described both in the OPT and OPL documentation. Please note that you need PHP 5.3 or PHP 5.2 with installed PHAR extension in order to use it. As we have the PHAR support, we need to work on the performance a bit. The developers claim that PHAR-s can be as fast as the ordinary files, but our tests show that OPT and OPL archives work a bit slower than the classic solution. Fortunately, it is only a matter of time. This is a relatively new piece of technology and we have to do some research in order to determine, how to get more from it.