January 14th, 2008
Actually Limb3 2007.4 was released on the 31st of the December 2007 but we(here in Russia) have 10 days of official holidays and I simply was too lazy to blog anything during those crazy days of champagne-with-vodka-fest-and-early-morning-hangovers
If you are wondering what Limb3 actually is and why world needs another PHP…er…framework(btw I hate this word too!), here’s a brief introduction. Limb3 is just a bunch of relatively independent packages, it is not a monolithic framework. Some packages are pretty unique(e.g {{macro}}) while others were inspired by cool stuff available for other than PHP platforms(e.g. active_record inspired by Rails’ ActiveRecord). And no, Limb3 was never intended to be “the one and the only one true PHP framework”. I personally believe in well thought code re-usability, thus the end application may contain bits of ezComponents, ZendFramework, PEAR, Limb3 and name-your-favorite-PHP-libraries-here.
Anyway, it’s better late than never, so here’s the list of the most notable changes made during past 6 months:
* ACTIVE_RECORD package: better invalid fields handling using
exceptions, support for different names of the primary key added
* CORE package: cruft cleanup, refactoring and misc. code
optimizations
* CACHE package: cleanup and better implementation, added
initial APC and Memcached support
* DATETIME package: major refactoring, renaming lmbDate into
lmbDateTime, etc
* {{macro}} alternative to WACT templating engine added with almost
all WACT alike functionality(and even more!)
* IMAGEKIT package: complete redesign using filters and fluent interfaces
* TESTS_RUNNER package: test groups and methods filters, better
coverage support
* JS package: upgraded jQuery to 1.2.1
* MAIL package: upgraded phpmailer to 1.73
* WEB_APP package: major cleanup, removed all commands and obsolete
controllers
* VIEW package: support for view selection based on template extension
added(currently MACRO and WACT)
* TREE package: ArrayAccess and ArrayIterator interfaces compatibility fixes
* FS package: more generic file system iterators added
Please note, this is rather a general changelog above, see the specific package changelog for more details.
The bundled release of all packages is available in the SourceForge downloads section of Limb3-2007.4
Read the rest of this entry »
Posted in limb, php | 1 Comment »
December 10th, 2007
An experienced PHP developer might be wondering why posting this topic in a blog if PHP already has universal and almost transparent tools for this job, specifically serialize and unserialize built-in functions.
The key statement here is “almost transparent” which means you have to include all class definitions before invoking unserialize or use some __autoload schema. Otherwise you are going to face the dreaded “The script tried to execute a method or access a property of an incomplete object” fatal error.
The whole problem is due to the fact a serialized object has no idea about its class definition except the class name(the reason behind that is absolutely valid).
Read the rest of this entry »
Posted in oop, php | 14 Comments »
November 27th, 2007
Working with windows shares in Linux is kinda painful, especially if you are a console geek and don’t like all that magic Gnome and KDE network applets do for you during connection to some smb server(what even worse these connections are only “visible” in GUI not in console).
I just needed something as low-level as possible and at the same time simple and convenient. Using smbmount with friends(smbumount, smbclient) is a possible way to go but I’m too lazy to type it each time and remember all its options
After some googling around it turned out that autofs could be the right tool. I only had to configure it properly… It took several hours of heavy googling, reading scarce blog posts, hacking with autofs and tearing lots of my hear before I finally got more or less acceptable solution for this problem.
Read the rest of this entry »
Posted in autofs, smb, *nix | No Comments »
November 19th, 2007
Here are my Russian “AOP in PHP” slides from secon conference which took place on the 13th of the November 2007 in Penza, Russia.
Go grab it if you are interested in Aspect Oriented Programming in PHP or simply want to practice your Russian 
Posted in talk, aop, php | No Comments »
November 19th, 2007
Setting up Chiara_PEAR_Server with Crtx front end is a little bit confusing(even if you follow the official guide) but at least it happens just once
Another important matter is maintaining your lovely PEAR channel up-to-date which, of course, assumes nice and easy way of uploading new packages. Actually Crtx’s web interface provides such a way and it works just fine for a couple of packages but if you have more than a dozen of them uploading new packages quickly becomes a boring process(e.g. we have 20+ packages at Limb3 PEAR channel)
That’s why I hacked up a script which automates this process quite a bit
Read the rest of this entry »
Posted in pear, limb, php | No Comments »
November 17th, 2007
I’m using Crtx_PEAR_Channel_Frontend-0.3.1-alpha as a PEAR channel front end and I’m pretty happy about it. However there seems to be a bug in the Crtx_PEAR_Channel_Frontend :: getPackageLatestReleases() method at line 500.
It reads:
unset($release[$states[$i+1]]);
While it should read:
unset($release[$states[$i]]);
I tried to email the original author Davey Shafik some time ago to no avail but at least now you are warned 
Posted in pear, php | No Comments »
November 10th, 2007
I’m glad to announce the new release of the limb/tests_runner package which reached 0.8.7-beta version! This package ships with limb_unit - a SimpleTest tests “swiss army knife” console based runner. If you’d like to know more about limb_unit utility I would highly recommend reading its documentation since it provides quite unique features like nested fixtures, code coverage and so on(documentation it’s actual for 0.8.5-beta as of this writing, but that’s ok).
This release introduces some unique filtering features which can be quite useful for large sets of tests. Now it’s possible to use filters for the following entities:
- test classes
- test classes’ methods
- test classes’ PHPDoc @group annotation tags
In the rest of this post I’ll describe these new features in detail.
Read the rest of this entry »
Posted in limb, tdd, php | 1 Comment »
November 4th, 2007
After having used multiple template engines for the last 5 years I’m a strong believer that the best template engine is…PHP itself
We just need some tools to make the usage of raw PHP in templates more friendly and readable.
I have used the forked version of WACT template engine for about 3 years and finally come to the conclusion that its runtime part is way too complicated and non obvious at times. However I do very like the idea of compile time tree of components which generate PHP code. At the same time I just wanted to simplify WACT and make the process of adding new tags much more straight-forward.
That’s why I have hacked up the initial implementation of {{macro}}. To be short, the main idea behind {{macro}} is to use C/C++ alike(but way more sophisticated) macro tags to simplify usage of raw PHP in templates.
Read the rest of this entry »
Posted in limb, php | 7 Comments »
November 4th, 2007

If you have ever tried to setup the Continuous Integration process using one of the well known ‘classic’ tools like CruiseControl you might have been wondering if there’s a simpler and quicker way. I have been wondering too, thus meet Buildman
Read the rest of this entry »
Posted in limb, tdd, ci, php | No Comments »
October 20th, 2007
At my company we have lots of MySQL databases(usually one for each virtual host) and each database has its unique user. Adding a new database and a user with proper permissions can be quite tedious, that’s why I hacked up the following script which saves some of my precious time
Read the rest of this entry »
Posted in mysql, *nix, administration | No Comments »