Posts by Category

Symfony

Symfony Lock and Messenger component

8 minute read

The lock component have saved me so many times. It helps me with race conditions, it makes my code simpler and my application more reliable. I’m using it to ...

PHP 7.4 preloading benchmark

6 minute read

Preloading arrived to PHP 7.4.0 in November 2019. I was super excited about this and I started to try it out. But I quickly noticed that it was a little bug...

Symfony HTTP Client and caching

3 minute read

Symfony has a HTTP client which differ from other clients like Guzzle, Buzz or clients from the HTTPlug organization. Symfony’s HTTP client is asynchronous b...

Retry with SNS and Symfony Messenger

10 minute read

In a previous post I described how we are using Amazon SNS with Symfony Messenger. But what I didn’t mention is how we handle failures. Sure, we write perfe...

Symfony Messenger on AWS Lambda

5 minute read

For the past 4 years we have developed web applications with a message bus. The Symfony Messenger component was released around a year ago and I’ve loved it ...

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

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 ↑

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 ↑

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 ↑

Bref

Retry with SNS and Symfony Messenger

10 minute read

In a previous post I described how we are using Amazon SNS with Symfony Messenger. But what I didn’t mention is how we handle failures. Sure, we write perfe...

Symfony Messenger on AWS Lambda

5 minute read

For the past 4 years we have developed web applications with a message bus. The Symfony Messenger component was released around a year ago and I’ve loved it ...

Using NewRelic with Bref on AWS Lambda

3 minute read

Running serverless is great. When migrating our applications to use Bref we realized that we need a non-standard php-extension. With “non-standard” I mean t...

Back to Top ↑

Messenger

Symfony Lock and Messenger component

8 minute read

The lock component have saved me so many times. It helps me with race conditions, it makes my code simpler and my application more reliable. I’m using it to ...

Retry with SNS and Symfony Messenger

10 minute read

In a previous post I described how we are using Amazon SNS with Symfony Messenger. But what I didn’t mention is how we handle failures. Sure, we write perfe...

Symfony Messenger on AWS Lambda

5 minute read

For the past 4 years we have developed web applications with a message bus. The Symfony Messenger component was released around a year ago and I’ve loved it ...

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 ↑

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 ↑

PHP

Installing Blackfire on multiple servers

4 minute read

At Happyr, we have about 30 applications running across 14 Amazon EC2 servers and a lot of Lambda functions. Most of them are small microservice application...

PHP 7.4 preloading benchmark

6 minute read

Preloading arrived to PHP 7.4.0 in November 2019. I was super excited about this and I started to try it out. But I quickly noticed that it was a little bug...

Compiling PHP 7.4 on OSX

3 minute read

I think I am a decent PHP programmer, but I am lost when it comes to devops, C, Makefiles and compiling stuff. I just want to write brew upgrade php and be h...

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 ↑

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 ↑

Web

Blocking vs non-blocking fonts

1 minute read

Just the other day I found out about the font-display: swap; css directive. It basically allows you to configure the browser to load the webpage first and th...

Back to Top ↑

Neo4j

Back to Top ↑

Recommendation engine

Back to Top ↑

Serverless

Back to Top ↑

Blackfire

Installing Blackfire on multiple servers

4 minute read

At Happyr, we have about 30 applications running across 14 Amazon EC2 servers and a lot of Lambda functions. Most of them are small microservice application...

Back to Top ↑

Lock

Symfony Lock and Messenger component

8 minute read

The lock component have saved me so many times. It helps me with race conditions, it makes my code simpler and my application more reliable. I’m using it to ...

Back to Top ↑

Runtime

Back to Top ↑