Posts

5 Tips for better code reviews

Become an expert code reviewer

Jun 21, 2024

Analyze your tests with PHPStan

Use PHPStan to analyze your tests, to make them more effective, and reduce bugs

Jun 10, 2024

How to create a random string in PHP
How to create a random string in PHP

Use the Randomizer class to generate a random string, based on an input string.

Jun 4, 2024

Mastering PHPUnit: Using Mocks and Stubs

Learn how to use mocks and stubs in PHPUnit to make your tests faster and more focused.

May 30, 2024

Mastering PHPUnit: Using data providers

Learn how to use data providers in PHPUnit, to test a lot of scenarios and reduce code duplication

May 22, 2024

Mastering PHPUnit: Writing Your First Test with PHPUnit

Learn how to write your first tests in PHPUnit, using assertions. Use methods like setUp and tearDown, to reduce code duplication

May 17, 2024

Mastering PHPUnit: an introduction

In this blog series we’ll go from writing our first unit test to being a PHPUnit master. This first post will go over the basics, and introduce you to PHPUnit

May 3, 2024

Never deploy an untagged dependency again

Today we ran into an issue with a build in one of our projects. Composer could no longer install, as a dependency was gone. When we opened our pipeline logs we saw the following error:

Apr 26, 2024

Stop (ab)using allow failure

We’ve all had our CI fail due to an issue that couldn’t be fixed right away. Usually something like a security issue in a downstream package that can’t be updated yet. This then causes the build to fail, making us unable to merge or deploy. allow_failure seems like a great way to solve this, but it is not.

Jul 24, 2022

Creating better services

When writing code, you generally want to split up the logic in to different classes. You have your controller classes which take a request, and return a response. You write value objects to represent information which is important to your application. You may write commands, command handlers, repositories and more. The most important group of classes you write are probably your services, which hold (most) of the logic of your app.

Nov 13, 2021