Author Archives: christer

Fat Models, Chubby Routes, Super-Skinny Controllers

We have just started a blog at work where we will be writing about some of the technologies we use daily. I just wrote a post about beefing up the routes in Zend Framework applications. Read all about it over … Continue reading

Posted in PHP, Technology, Work related | Tagged , , | Leave a comment

Playing with traits in PHP 5.4alpha1

PHP 5.4alpha1 was released the other day with some cool new features. One of them is an implementation of traits. From the RFC: Traits is a mechanism for code reuse in single inheritance languages such as PHP. A Trait is … Continue reading

Posted in PHP, Technology | Tagged , , | 7 Comments

Mocking MongoCollection with Mockery

I have played around with the mongo extension to PHP lately and came across an issue when I was trying to write unit tests with PHPUnit for some methods using MongoCollection::insert(). Consider a class method looking like this: The Image … Continue reading

Posted in PHP, Technology | Tagged , , , , , , | Leave a comment

Changed blog theme

I just changed the theme on this blog to the default WordPress theme. Please let me know if anything looks weird.

Posted in Misc | Leave a comment

How to set up your own PEAR channel

If you want to make your projects available to users as PEAR packages you will most likely want a PEAR channel. This way users can install/upgrade/remove your packages by using the pear command. There are a couple of solutions available … Continue reading

Posted in PHP, Technology | Tagged , , | 3 Comments

SqlDiff-0.0.2 released

Just pushed a new version of SqlDiff. The new version supports colors in the output, and the generated statements inserts new columns at the correct positions. To install simply do: christer@aurora:~$ sudo pear channel-discover pear.starzinger.net Adding Channel “pear.starzinger.net” succeeded Discovery … Continue reading

Posted in PHP | Tagged , , | Leave a comment

SqlDiff-0.0.1 released

Some minutes ago I created the first PEAR package of SqlDiff, a small tool that I have been playing around with some time. The tool is meant to aid people in making sql statements based on the diff of two … Continue reading

Posted in PHP | Tagged , , , , | Leave a comment