These are the notes I took during the sessions. Some of them don’t have a clear structure, but are individual, unconnected ideas.
In this article you’ll learn about agile retrospectives, the basic principles of Non-Violent Communication (NVC), and how applying those principles to a retrospective can improve the retrospective. If you’re already familiar with agile retrospectives, you can skip the sections explaining it. What is an agile retrospective? An agile retrospective is a meeting format, commonly used in software development, but also suitable for teams outside of software development. Its main purpose is the continuous improvement (Kaizen) of processes, collaboration and work itself.
The more dependencies a class has, the harder it becomes to initialize in unit tests with all its dependencies. Your tests will become longer and longer. This articles explores three ways to provide test doubles (also known as “mocks”) to your tested class, while keeping the tests as short and expressive as possible: Using properties in the test class, using a builder pattern with a fluent interface and using named parameters (available in PHP 8.
At work we’re using PHPStan to do a static analysis of our code, checking if the provided types match the required types. We are using the most restrictive setting that forces us to have type annotations for arrays. Recently, this led to an error when using Doctrine DBAL, using DriverManager::getConnection(). In this article I’ll explain how to use better type annotations for the parameter of DriverManager::getConnection(). Let’s say we have a test environment class that initializes a database connection, used by the tests for the database adapter.
Many PHP database libraries use a
while loop with assignment to iterate
over database results. In this article I’ll show why this pattern is so
pervasive, why it opens the door for errors and what you can use instead.
I tried to add a web service end point to an application using the API Platform PHP library. This article shows if the library goes well together with the Hexagonal Architecture that my application uses.
“Transposing” or “pivoting” rows to columns in a database query is a common task. These are my notes on how I evolved a SQL query to get the desired result.
My notes from MenderCon 2021, an open space conference on modernizing and improving existing codebases.
In this article you’ll learn how to run your PHPUnit tests whenever a PHP file changes. This is useful if you don’t use an IDE that does this or want to share the results during a pairing session where only one party has access to a PHP execution environment. With the command line tool entr you can watch for changes in a list of files and run a command whenever one of the files changes.
This post shows my step-by-step journey using the Vue composition API in a Vue project that uses Vuex. I started with the question “How can you gradually introduce the composition API without having to rewrite everything?”