DANIEL WERNER

Senior Software Developer | TDD and Clean Code enthusiast | Open-source contributor and maintainer

PHP Quality Tools package

Introduction If we’d like to write error free, robust, high quality PHP code, the static code analyzers can be of great help. If you work on open-source projects you can take the advantage of using Scrutinizer and StyleCI for these purposes. However if you are working on other, proprietary projects, you might need to run/configure these tools yourself. There are plenty of such tools to use with php, you can find quite comprehensive lists on other websites, for example here and here. My tools of choice are the following: PHP Code Sniffer – check the code according to the defined...


My new blog with some vintage content

Introduction As a senior developer I think it is important to share the knowledge, thoughts, and day to day experiences. Attending to conferences, meetups and writing a blog is a great way to achieve this. I was working on this blog, when remembered the early days of my career. Back in 2008 (huh, it was 11 years ago) together with 3 more young and ambitious developers we founded a company. The company itself was not a big success – to put it mildly – but we’ve learned a lot and worked hard these days. No composer, no GitHub Using open...


How to dump all MySQL databases into separate files

Sometimes we need to to dump all databases form a MySQL server. This can be done using the mysqldump utility with the –all-databases switch enabled. In this case mysqldump will dump all databases to the standard output or to a file if explicitly specified. Let’s assume a situation where we want to backup all of the databases from the server, with the possibility to restore only one database at a time. To achieve this, you need to dump all the databases one by one or to use a pre-made script to do the heavylifting for you.  I’ve found a simple...


Flex remoting with CakePHP – CpAmf plugin

The goal of this project was to use CakePHP controllers as flash remoting services. The basic idea was to use AMFPHP 1.9, because we used it before and it was a good choice in earlier projects. As nobody wants to “reinvent the wheel”, I googled for a solution to integrate the AMFPHP into the CakePHP framework. After a short research I found the following solutions: cakeAMFPHP plugin cakeAMF plugin I tried both solutions, but cakeAMFPHP does not use the latest AMFPHP, and with cakeAMF there was a problem using flex RemoteObjects. The idea for my implementation came from cakeAMFPHP. Requirements CakePHP 1.2 AMFPHP...