March 2012
1 post
4 tags
Validation differences from CakePHP and Lithium
Validation rules are one of the changes between CakePHP and Lithium. Instead of creating the rules in the model you wish to use them with, they are now managed by a validation class. The way of calling them has also changed slightly and the way of creating custom rules has changed massively.
Assignments
To use validation rules in CakePHP you assign them to the object variable...
February 2012
3 posts
Getting started with Gearman and PHP on Ubuntu
I’ve been wanting to play with Gearman for a while and just haven’t found the time. But I just found some time. So here I am playing with Gearman. So started with a fresh ubuntu install. Here’s a quick guide of how I got Gearman running tasks using pear Net_Gearman.
root@gearman:~# apt-get install php5 php-pear gearman
root@gearman:~# pear install...
Scale horizontally automatically with Rackspace...
Being a geek in the era of the Cloud, I wanted to be able to have servers set up to scale automatically to suit demand. Here’s how I managed to do it with my vendor of choice Rackspace and PHP.
To start off with I needed to create a master server which I can then create images off and spawn new servers from. For the purposes of this exercise I just created a basic shell of a HTTP server...
9 tags
Setting up Jenkins with Lithium
After my blog post about how I set up Jenkins and Phing to build lithium apps I was asked if I could share my Jenkins set up. So I figured I might as well document the entire install. Easiest way to document the entire process is to start from fresh and document each step, so I fired up a ubuntu cloud server instance and here’s what I did to get Jenkins to successfully build my lithium app.
...
January 2012
2 posts
7 tags
Using Phing to run Lithium tests
Since Continuous Integration is awesome and I’m going be using Lithium a lot, it was clear I needed away to run my Lithium unit tests via Jenkins. Since I use Phing for builds on Jenkins and that Lithium uses it’s own testing framework there was only one solution. Build a phing task to run Lithium tests. So after a quick hacking session I completed a quick task that allows for the...
6 tags
How unit testing with Lithium
At work we’re starting to use Lithium for our main product. So once I found out, the first thing I wanted to do was to find out how I could unit test with it. In some cases it makes life really easy in other cases it made it bitch. So here’s what I’ve figured out so far. If you know a better way please tell me.
Original Controller
This is a simple controller that just sets a...