What is efficiency?

The answer may be trivial. Efficiency is when you work as hard as you can and as quick as possible to complete a task. The answer could also be a bit more complicated… My MacBook just broke, I googled the issues I was experiencing and I found out that this is a common...

Always use caret instead of tilde

I’ve been noticing people having trouble understanding the differences between the caret (“^”) and the tilde (“~”) operator in the composer.json file. Composer’s documentation is great but a bit short, that is why I write this blog...

How Happyr work with Symfony translations

You probably follow the Symfony best practices when you develop web applications. That is great but there is no much information about translation. The official documentation tell you about file format, file location and something about translations keys. But then...

Do not worry about code style fixes

Earlier this year I installed Fabiens php-cs-fixer on my continuous integration server. So at each build I checked if there were any code style errors, if so I failed the build. Easy as pie and our source code were always nice and clean. But this new feature changed...

User as a service in Symfony2

To get the current logged in user in Symfony2 is kind of complicated. You have to do a lot for such simple task. First you have to get the TokenStorage to retrieve the token. The token may or may not exist. If the token exist you can get an user object or a string...

Coveralls with Github and Travis

The other day when I was making a PR to a Github project I got a comment like this: Coverage decreased (-0.87%) when pulling f285fe0 on Nyholm:patch-1 into 5506244 on some-project:master. This was an automated message from Coveralls.io. It is a tool made for Ruby to...

Hack interface overview

  There are a number of predefined interfaces in Hack. This post is going to give you an overview about the interfaces that are a subtype of Traversable. Traversable<Tv> This is an abstract interface. Each an every class that implements this interface may...

Continuous integration with Symfony2

There are many great articles that tells you why you should use continuous integration i.e. the one by Martin Fowler and the book This is Lean by Niklas Modig and Pär Ahlström. This article describes our workflow and what tools we use to achieve continuous integration...