osteel's blog Web development resources

PHP category

Building a PHP CLI tool using DDD and Event Sourcing: distribution

Distribution is about meeting your users where they are – the more options you offer, the broader public you can reach. This post is a step-by-step guide to setting up a Laravel Zero application for distribution over various channels, using Dime as an example.

Building a PHP CLI tool using DDD and Event Sourcing: getting started with EventSauce

This post is a step-by-step guide to getting started with EventSauce, an Event Sourcing library for PHP. While it is part of a series and uses Laravel Zero as a starting point, it requires no prior knowledge of past articles and can easily be adapted for any PHP application.

Building a PHP CLI tool using DDD and Event Sourcing: software design

How can we combine Domain-Driven Design, Event Sourcing and the Layered Architecture pattern to design a piece of software? This is the focus of this new instalment of a series exploring building a complex console application with PHP.

Upgrade your project to PHP 8.2 with Rector

I wanted to upgrade a project to PHP 8.2 and figured I could use Rector for this. Not only was that the case, but I also completely underestimated how easy it was going to be.

Building a PHP CLI tool using DDD and Event Sourcing: the model

The model is where the software meets the domain. The goal of the model is to identify and express the use cases and constraints that will be built into the software, using schemas and diagrams. It is where we extract the essential concepts from the domain and where we consolidate the ubiquitous language.

Building a PHP CLI tool using DDD and Event Sourcing: the domain

We continue our exploration of DDD with the expression of the domain. A domain is a group of related concepts and ideas about a field, articulated by experts in that field. Expressing the domain is a way to get familiar with its lexical field and to start building the ubiquitous language, the language to be used consistently in the model and across all communications.

Building a PHP CLI tool using DDD and Event Sourcing: why?

This is the introduction to a blog series about building a PHP CLI tool to help me track my crypto activity. I haven't built anything yet – the goal is to document my progress as I go, publicly. I intend to use Laravel Zero, Event Sourcing, and to follow a Domain-Driven Design approach.

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.

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.