Posts by Category

Hack

Tuple

1 minute read

A tuple is very similar to a PHP array and a shape. The key feature of tuples is that they are immutable. You may not change the length or the types of the e...

Shape

1 minute read

Hack introduced a concept called Shapes. It is an object like the associative PHP array but with predefined array keys. If you are familiar with C you might ...

Why collections?

6 minute read

Hack has introduced some new object to replace the PHP array. These collections are Vector, Set, Map, Pair and some more. If you are familiar with Java or C#...

Hack constructors

1 minute read

Hack got a lot of features and improvements of different kinds. It comes with some syntactic sugar. The constructor is a subject for a syntactic sugar improv...

Hack modes

3 minute read

When you are using Hack you are running in one of 3 different modes. The modes are telling the type checker how strict (or forgiving) it should be when check...

Method declarations in Hack

4 minute read

This post will go more in details of my last post about types. After reading that last post you know that a method declaration in Hack will look like this:

Hack types

4 minute read

The biggest difference between Hack and PHP is that PHP is using dynamic typing and Hack is statically typed. Java and C# is other languages that is statical...

Start coding with Hack

2 minute read

If you like to take your PHP to the next level there is an excellent option for you: Hack. It is a programming language develop by Facebook. They have been u...

Symfony bundle using Hack

1 minute read

I’ve been working with the Symfony.se website the last couple of weeks. In a discussion on Github we argued how a nice excerpt should look like. We decided t...

Try Hack and HHVM

2 minute read

Lately there has been a lot of talk about HHVM and the new programming language Hack. It all looks great, to bad it does not run your code. The HHVM team is ...

Back to Top ↑

Symfony2

How Happyr work with Symfony translations

11 minute read

You probably follow the Symfony best practices when you develop web applications. That is great but there is no much information about translation. The offic...

User as a service in Symfony2

4 minute read

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 re...

Continuous integration with Symfony2

5 minute read

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 Modi...

Choose owning side in OneToOne relation

2 minute read

Many times I’ve come got to a situation where I have a unusual high query count. When I inspect the queries in the Symfony profiler I can see that Doctrine i...

Real asynchronous events with Symfony2

4 minute read

PHP is a great language but there are some drawbacks. One thing I miss the most is multi-threading. Wouldn’t it be great to be able to do some calculations i...

Symfony bundle using Hack

1 minute read

I’ve been working with the Symfony.se website the last couple of weeks. In a discussion on Github we argued how a nice excerpt should look like. We decided t...

Rename dump from AsseticBundle

3 minute read

In your main template you probably should have assetic to manage your assets. In the production environment you would like to dump this to static files.

Using Bower for your Symfony2 application

1 minute read

I recently switched to Bower for managing my frontend third party libraries. First I defined some packages that I needed in a bower.json file and put it in t...

Back to Top ↑

Happyr

Always use caret instead of tilde

1 minute read

I’ve been noticing people having trouble understanding the differences between the caret (“^”) and the tilde (“~”) operator in the composer.json file. Compos...

How Happyr work with Symfony translations

11 minute read

You probably follow the Symfony best practices when you develop web applications. That is great but there is no much information about translation. The offic...

Do not worry about code style fixes

1 minute read

Earlier this year I installed Fabien’s php-cs-fixer on my continuous integration server. So at each build I checked if there were any code style errors, if s...

Hack: Asynchronous programming

2 minute read

Hack has introduced asynchronous programming. This is really great but it is not really documented at the moment. Not at all actually… I’ve done some experim...

Hack Lambda expressions

2 minute read

Hack is all about making it easier for the developer to write good code. There has been some improvement of the PHP anonymous function or closer as they also...

Using generics in Hack

3 minute read

Hack has introduced some new collection objects that will be a replacement for the array(). But what if you feel that something is missing? What if you have ...

HappyR Dialog library

1 minute read

I know there is plenty of javascript libraries that help you show dialogs. I’ve used a handful of them and I’ve read the documentation of many more. Many of ...

Back to Top ↑

Developing

What is efficiency?

2 minute read

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 co...

Do not worry about code style fixes

1 minute read

Earlier this year I installed Fabien’s php-cs-fixer on my continuous integration server. So at each build I checked if there were any code style errors, if s...

Continuous integration with Symfony2

5 minute read

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 Modi...

Finally, a develops blog

less than 1 minute read

We are online! We started to build some open source projects to share on Github. But we needed a website to put documentation, faq etc… We also needed a plac...

Back to Top ↑

Symfony

Generate URLs in Symfony commands

3 minute read

It has been great many years since Symfony 2.0 was released. 2.0 did not have as many great features as Symfony 4.0, but it was flexible and you could still...

Back to Top ↑

HHVM

Start coding with Hack

2 minute read

If you like to take your PHP to the next level there is an excellent option for you: Hack. It is a programming language develop by Facebook. They have been u...

Symfony bundle using Hack

1 minute read

I’ve been working with the Symfony.se website the last couple of weeks. In a discussion on Github we argued how a nice excerpt should look like. We decided t...

Try Hack and HHVM

2 minute read

Lately there has been a lot of talk about HHVM and the new programming language Hack. It all looks great, to bad it does not run your code. The HHVM team is ...

Back to Top ↑

Library

Real asynchronous events with Symfony2

4 minute read

PHP is a great language but there are some drawbacks. One thing I miss the most is multi-threading. Wouldn’t it be great to be able to do some calculations i...

Back to Top ↑

Performance

Choose owning side in OneToOne relation

2 minute read

Many times I’ve come got to a situation where I have a unusual high query count. When I inspect the queries in the Symfony profiler I can see that Doctrine i...

Real asynchronous events with Symfony2

4 minute read

PHP is a great language but there are some drawbacks. One thing I miss the most is multi-threading. Wouldn’t it be great to be able to do some calculations i...

Back to Top ↑

Bower

Using Bower for your Symfony2 application

1 minute read

I recently switched to Bower for managing my frontend third party libraries. First I defined some packages that I needed in a bower.json file and put it in t...

Back to Top ↑

Java

Real asynchronous events with Symfony2

4 minute read

PHP is a great language but there are some drawbacks. One thing I miss the most is multi-threading. Wouldn’t it be great to be able to do some calculations i...

Back to Top ↑

Doctrine

Choose owning side in OneToOne relation

2 minute read

Many times I’ve come got to a situation where I have a unusual high query count. When I inspect the queries in the Symfony profiler I can see that Doctrine i...

Back to Top ↑