osteel's blog Web development resources

PHP category

A crypto activity tracking tool. Introduction: why?

This is the introduction to a series of blog posts about building a crypto activity tracking tool. I haven't built anything yet – the goal is to document my progress as I go, publicly. The tool will be a CLI application I intend to build with Laravel Zero, following a DDD approach and using Event Sourcing.

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

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

Talking about Collections at PHP Quebec

Who knew Collections were so popular? After Laravel Montreal last month, I will be speaking about Collections again at PHP Quebec on July 4.

How to use the fork of a repository with Composer

When using packages maintained by other developers, you may eventually find yourself waiting for a fix, an update, or the merge of a PR that will be available with the next release. I you can't wait, a workaround is to fork the corresponding repository, make the changes you need and then use your fork instead of the original package.