Debugging PHP Applications at Web Summer Camp 2021


Conference: Web Summer Camp Croatia 2021, Sibenik
Title: Fixing PHP Applications

Sooner or later, any application will run into errors. Some of them will be your fault, or that of a teammate. Others stem from third party libraries you are using. Even if your code would be perfect, other systems you rely on will sometimes fail. In this workshop, we look at how you can prevent errors, mitigate the impact of errors and track what is going on in your application. We do a bunch of hands-on exercises with various debugging strategies that help to locate the cause for an error quickly.

Read more

php architecture https web server

How I host multiple websites on Linode with HAProxy


This website and a couple others all run on a single small Linode virtual server. Most sites are generated with the static site generator Sculpin, but some require PHP and other technologies.

I wanted to keep the server relatively clean and be able to test my setup locally. Therefore i created a couple of docker containers and use docker-compose to run the whole system. All pages are served over https, using letsencrypt to get free SSL certificates. In this post I want to share about the tools I use.

Read more

php architecture https web server

Integrating with the Sculpin Static Site Generator


Sculpin is a generator for static HTML websites. You write your content in Markdown, Twig Templates or HTML and Sculpin generates the whole page from it. An all-static HTML website is very easy to host, as you only need something to deliver static files like an AWS S3 bucket. is an image CDN that scales and optimizes images for the web. We recently released an update to the Rokka Symfony Bundle that adds support to upload images from Twig templates. As Sculpin is based on Symfony, Bundles can be loaded and configured like with a normal Symfony application.

In this blog post, I will show some examples of how the two can be used to build a static website with images scaled and delivered by

Read more

php architecture rokka web

Symfony World: Decoupling an Application with Symfony Messenger


Conference: Symfony World 2020, Online
Title: Decoupling an Application with Symfony Messenger

Quick response times are crucial. Time consuming tasks triggered in web requests should be executed asynchronously, if at all possible. In this talk I will give a short overview of what message queues are and then show a case study how we split up an application into smaller services and how we use message queues to coordinate the services.

Read more

php message queues symfony rabbitmq conference

Doctrine and Generated Columns


Using a smart SQL query with subqueries, we reduced the time to build a data export by a factor of (at least) 50. On the development system with little data, we got from the response from 11 seconds to about 0.25 seconds.

To make this possible, we had to use a generated column to be able to create an index on a field inside a JSON column. Doctrine does not know Generated Columns, so we had to hide the column and index from the Doctrine Schema Generator.

Read more

php performance mysql doctrine

PSR-18: Abstracting HTTP clients in PHP

Conference: PHP Benelux 2019, Antwerp, Belgium
Title: PSR-18: Abstracting HTTP clients in PHP
Links: slides, demo

PSR-18 defines how to send PSR-7 requests without binding your code to a specific client implementation. This is particularly interesting for reusable libraries that need to send HTTP requests but don’t care about specific client implementations.

http php conference

Going crazy with Varnish: Caching pages of logged in users

Conference: Symfony Con 2018, Lisbon, Portugal
Title: Going crazy with Varnish: Caching pages of logged in users
Links: slides

You know how HTTP caching works but need more? In this talk we look into ways to cache personalized content. We will look at Edge Side Includes (ESI) to tailor caching rules of fragments, and at the user context concept to differentiate caches not by individual user but by permission groups. A big help to leverage this concept is the FOSHttpCache in combination with either Varnish or the Symfony HttpCache reverse proxy.

varnish caching conference

HTTP Caching with Varnish

Conference: PHP Romania 2018, Cluj, Romania
Title: HTTP Caching with Varnish
Links: slides

With the Varnish caching proxy you can make websites blazingly fast, while also handling a lot more load. The key is to understand how cache handling in HTTP works. We will also look at concepts like cache invalidation and cache tagging, as well as advanced concepts like Edge Side Includes (ESI). A lot of this talk is applicable regardless of the programming language of your backend. Examples will use the PHP library FOSHttpCache and sometimes the Symfony FOSHttpCacheBundle.

varnish http caching conference

Beyond REST maturity levels: Insights from building a real life, high-load REST API

Conference: PHP Benelux 2018, Antwerp, Belgium
Title: Beyond REST maturity levels: Insights from building a real life, high-load REST API
Links: slides

Implementing a REST API is not only about designing correct resource URLs. I will talk about the software and system engineering part it takes to build a data API. I will show concrete examples from a project where we gather data from dozens of different services and systems and build a real-time capable data store. The main technology stack is Symfony, Elasticsearch and Varnish.

rest symfony message queues conference