osteel's blog Web development resources

A GitHub workflow to check the compatibility of your PHP package with a range of dependency versions

A common aspect of a PHP developer's job is to deal with Composer dependencies. We don't usually need to think about supporting various versions of these dependencies, just as we don't need to think about accommodating a range of PHP versions. Things are different for open-source software maintainers – they need to ensure their libraries will work with as many environments as possible. This post explores one way of automating compatibility testing, using a combination of test coverage and a GitHub workflow.

How to build and distribute beautiful command-line applications with PHP and Composer

When you think of command-line applications, PHP doesn't immediately come to mind. Yet the language powers many popular tools, either as independent programs or to be used within projects. This tutorial will walk you through the process of creating a simple game running in the terminal, using Symfony's Console component as a bedrock, GitHub Actions for testing, and Composer for distribution.

Vim is much cooler than you think

To a large extent, Vim still has a bad rep. This needs to change. But Vim does need a little help to get started, so here's an article explaining the basics, with gifs. The best part? There's probably a Vim extension for your favourite code editor already, so you can start using it today.

A complete guide to Laravel Sail

This post is about what to expect from Laravel Sail, how it works and how to make the most of it; it is also a plea to developers to break away from it, in favour of their own, tailored solution.

Validate your PHP API tests against OpenAPI definitions – a Laravel example

This article demonstrates how to write integration tests that compare API responses to OpenAPI 3+ definitions in order to validate that the former conform to the latter.

Dynamic GitHub profile README with Github Actions and PHP

A few weeks ago, GitHub quietly released a feature that was quickly noticed by the community – profile READMEs. A profile README is a global README file for your GitHub profile; in this article, I describe how I've used GitHub Actions and PHP to automatically update my profile README to list my blog's latest publications.

A simple Git pre-commit hook running PHP_CodeSniffer

Git hooks are scripts that are run every time a specific Git-related event happens, like a commit or a checkout. This article shows you how to use a simple hook to enforce a coding standard at every commit in a PHP project.

Docker for local web development, conclusion: where to go from here

I hope you enjoyed going through these tutorials as much as I enjoyed writing them, and that you now clearly see how to use Docker to your advantage, and feel comfortable doing so. That being said, you might still feel like some stones are left unturned, so I will try and flip some of them in this conclusion, the same way I used the introduction to try and address some of the concerns you might have had before taking the plunge.

Docker for local web development, part 8: scheduled tasks

Once we start to get comfortable around Docker and make it a full component of our development environment, inevitably there will come a time when we have to deal with some form of task scheduling.

Docker for local web development, part 7: using a multi-stage build to introduce a worker

There are many ways to increase an API's responsivity, and one of them which is also the focus of today's article is the use of queues. Queues are basically lists of tasks to be performed at a later time which, unlike flossing, will be completed eventually. What's important about those tasks – called jobs – is that they don't need to be performed during the lifecycle of the initial request.