Hosted continuous integration services for PHP

Today, I’ve been evaluating popular hosted CI services to see how well they’re working with PHP and how much they cost. is free for Open Source projects (one concurrent build). Paid plans for private repositories start at 25 $ / month. Builds are configured on the Web site. PHP support is marked…
Read more

My way of testing PHP code


When I’m writing unit tests, I don’t mock dependencies by default but use real objects and test doubles via dependency injection. Mocking is creating objects that simulate the behaviour of real objects. I often hear concerns that the resulting tests therefore are just component tests and not true unit tests. This post will explain the rationale behind this decision and how less…
Read more

Form Validation vs Model Validation


This is a follow-up on Why I’m using a separate layer for input data validation that explains the key differences between client-side, input value (form) and model validation. In general, model validation operates on trusted data (internal system state) and should ideally be repeatable at any point in time while input validation explicitly operates once on…
Read more

Why I’m using a separate layer for input data validation


While some developers seem to prefer to implement their user data validation rules directly in the model layer (or even worse, the ORM entity layer), this very often leads to problems as described by Stefan Priebsch in his blog post on How to Validate Data. In addition to the many issues he mentioned, you should consider the following…
Read more

Dependent Symfony 2 Bundles and Testability


I just stumbled upon a question concerning Symfony 2 bundles and testability that I want to share with you. When developing with Symfony, beginners tend to use lots of existing bundles, because this seems to be the recommend way of building an application. Later, they wonder, why it’s so hard to write unit and component tests or they write functional…
Read more

PHP and Zend Framework 2 are losing popularity


According to Google Trends and the personal feedback I get from the PHP developer community, Zend Framework 2 quickly lost it’s initial momentum while SensioLab’s micro-framework Silex is attracting more developers slowly but steadily. If you already work with Symfony 2 and consider switching to Silex, you might want to have a look at Symlex: It’s based on Silex but uses the familiar Symfony dependency…
Read more

Howto: Install PHP, PHPUnit and Composer on Mac OS X


Make sure the directories /usr/local, /usr/local/bin and /usr/local/sbin exist and check the permissions, so that regular users can access them. This should already be the case, if you got Homebrew installed and working. Open ~/.bash_profile and check, if /usr/local/bin and /usr/local/sbin are properly added to your PATH environment variable: export PATH=”/usr/local/sbin:/usr/local/bin:$PATH” If there is no ~/.bash_profile yet, simply…
Read more

Mac OS X configuration for software developers


Coming from Linux and FreeBSD, I initially didn’t feel comfortable working with OS X and I still think it’s a bad idea to run a full featured Web server on a Mac. But there are a couple of things you can do to turn your Mac into a great development environment. Install the following essential software packages Google…
Read more

Reducing the Software Value Gap


Research shows at least 50% of IT developers’ time is wasted due to the following reasons: Rework due to incomplete or poorly defined needs and requirements (“incomplete kit”); Rework due to frequent changes in requirements and scope up to the final delivery stages; most such changes are not “must have” but only “nice to have”; Software…
Read more