osteel's bloghttps://tech.osteel.me/2023-08-10T00:00:00+01:00Company website launch, Dime series wrap-up and other news2023-08-10T00:00:00+01:002023-08-10T00:00:00+01:00osteeltag:tech.osteel.me,2023-08-10:posts/company-website-launch-dime-series-wrap-up-and-other-news<p>As August is a quiet month for pretty much everybody and I am spending some time away myself, here is a light post about what I've been up to recently.</p>Building a PHP CLI tool using DDD and Event Sourcing: distribution2023-07-10T00:00:00+01:002023-07-10T00:00:00+01:00osteeltag:tech.osteel.me,2023-07-10:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-distribution<p>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.</p>Building a PHP CLI tool using DDD and Event Sourcing: getting started with EventSauce2023-05-18T00:00:00+01:002023-05-18T00:00:00+01:00osteeltag:tech.osteel.me,2023-05-18:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-getting-started-with-eventsauce<p>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.</p>Building a PHP CLI tool using DDD and Event Sourcing: setting up Laravel Zero2023-05-04T00:00:00+01:002023-05-04T00:00:00+01:00osteeltag:tech.osteel.me,2023-05-04:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-setting-up-laravel-zero<p>This post is part of the "Building a PHP CLI tool using DDD and Event Sourcing" series but can also be read as an independent guide to getting started with Laravel Zero, a micro-framework for console applications.</p>Building a PHP CLI tool using DDD and Event Sourcing: software design2023-04-05T00:00:00+01:002023-04-05T00:00:00+01:00osteeltag:tech.osteel.me,2023-04-05:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-software-design<p>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.</p>Upgrade your project to PHP 8.2 with Rector2023-03-15T00:00:00+00:002023-03-15T00:00:00+00:00osteeltag:tech.osteel.me,2023-03-15:posts/upgrade-your-project-to-the-latest-php-version-with-rector<p>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.</p>Speaking at PHP London and other news2023-01-31T00:00:00+00:002023-01-31T00:00:00+00:00osteeltag:tech.osteel.me,2023-01-31:posts/speaking-at-php-london-and-other-news<p>I've been rather quiet around here for the past few months, so here's an update about what I've been up to. In this issue: Speaking at PHP London, organising PHP Sussex, update on the PHP CLI tool series.</p>Building a PHP CLI tool using DDD and Event Sourcing: the model2022-09-01T00:00:00+01:002022-09-01T00:00:00+01:00osteeltag:tech.osteel.me,2022-09-01:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-the-model<p>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.</p>Building a PHP CLI tool using DDD and Event Sourcing: the domain2022-08-17T00:00:00+01:002022-08-17T00:00:00+01:00osteeltag:tech.osteel.me,2022-08-17:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-the-domain<p>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.</p>Building a PHP CLI tool using DDD and Event Sourcing: why?2022-07-13T00:00:00+01:002022-07-13T00:00:00+01:00osteeltag:tech.osteel.me,2022-07-13:posts/building-a-php-cli-tool-using-ddd-and-event-sourcing-why<p>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.</p>A GitHub workflow to check the compatibility of your PHP package with a range of dependency versions2022-06-30T00:00:00+01:002022-06-30T00:00:00+01:00osteeltag:tech.osteel.me,2022-06-30:posts/a-github-workflow-to-check-the-compatibility-of-your-php-package-with-a-range-of-dependency-versions<p>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.</p>How to build and distribute beautiful command-line applications with PHP and Composer2022-01-31T00:00:00+00:002022-01-31T00:00:00+00:00osteeltag:tech.osteel.me,2022-01-31:posts/how-to-build-and-distribute-beautiful-command-line-applications-with-php-and-composer<p>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.</p>Vim is much cooler than you think2021-06-10T00:00:00+01:002021-06-10T00:00:00+01:00osteeltag:tech.osteel.me,2021-06-10:posts/vim-is-much-cooler-than-you-think<p>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.</p>A complete guide to Laravel Sail2021-01-05T00:00:00+00:002021-01-05T00:00:00+00:00osteeltag:tech.osteel.me,2021-01-05:posts/you-dont-need-laravel-sail<p>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.</p>Validate your PHP API tests against OpenAPI definitions – a Laravel example2020-11-11T00:00:00+00:002020-11-11T00:00:00+00:00osteeltag:tech.osteel.me,2020-11-11:posts/openapi-backed-api-testing-in-php-projects-a-laravel-example<p>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.</p>Dynamic GitHub profile README with Github Actions and PHP2020-08-13T00:00:00+01:002020-08-13T00:00:00+01:00osteeltag:tech.osteel.me,2020-08-13:posts/dynamic-github-profile-readme-with-github-actions-and-php<p>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.</p>A simple Git pre-commit hook running PHP_CodeSniffer2020-07-14T00:00:00+01:002020-07-14T00:00:00+01:00osteeltag:tech.osteel.me,2020-07-14:posts/a-simple-git-pre-commit-hook-running-php-codesniffer<p>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.</p>Docker for local web development, conclusion: where to go from here2020-07-06T00:00:00+01:002020-07-06T00:00:00+01:00osteeltag:tech.osteel.me,2020-07-06:posts/docker-for-local-web-development-conclusion-where-to-go-from-here<p>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.</p>Docker for local web development, part 8: scheduled tasks2020-06-08T00:00:00+01:002020-06-08T00:00:00+01:00osteeltag:tech.osteel.me,2020-06-08:posts/docker-for-local-web-development-part-8-scheduled-tasks<p>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.</p>Docker for local web development, part 7: using a multi-stage build to introduce a worker2020-05-25T00:00:00+01:002020-05-25T00:00:00+01:00osteeltag:tech.osteel.me,2020-05-25:posts/docker-for-local-web-development-part-7-using-a-multi-stage-build-to-introduce-a-worker<p>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.</p>Docker for local web development, part 6: expose a local container to the Internet2020-05-11T00:00:00+01:002020-05-11T00:00:00+01:00osteeltag:tech.osteel.me,2020-05-11:posts/docker-for-local-web-development-part-6-expose-a-local-container-to-the-internet<p>While using Docker for local development allows us to replicate a production environment as closely as possible in a self-contained way, in some instances exposure to the outside world is unavoidable. Typical use cases include testing a third-party service's webhook (like a transaction confirmation from a payment gateway), or showing a project's advancement to a client.</p>Docker for local web development, part 5: HTTPS all the things2020-04-27T00:00:00+01:002020-04-27T00:00:00+01:00osteeltag:tech.osteel.me,2020-04-27:posts/docker-for-local-web-development-part-5-https-all-the-things<p>While it is getting ever cheaper and easier to encrypt the web, somehow this evolution doesn't extend to local environments, where bringing in HTTPS is still far from a sinecure. This article intends to ease the pain by showing you how to generate a self-signed SSL/TLS certificate and how to use it with our Docker-based setup, thus getting us one step closer to perfectly mimicking a production environment.</p>Docker for local web development, part 4: smoothing things out with Bash2020-04-13T00:00:00+01:002020-04-13T00:00:00+01:00osteeltag:tech.osteel.me,2020-04-13:posts/docker-for-local-web-development-part-4-smoothing-things-out-with-bash<p>As our development environment is taking shape, the number of commands we need to remember starts to build up. With little effort, Bash will allow us to add a layer on top of Docker to abstract away most of the complexity, and introduce a standardised, user-friendly interface instead.</p>Docker for local web development, part 3: a three-tier architecture with frameworks2020-03-30T00:00:00+01:002020-03-30T00:00:00+01:00osteeltag:tech.osteel.me,2020-03-30:posts/docker-for-local-web-development-part-3-a-three-tier-architecture-with-frameworks<p>There are many ways to manage a multitiered project with Docker, and while the approach I am about to describe certainly isn't the only one, I also think this is a subject that doesn't get much coverage at all.</p>Docker for local web development, part 2: put your images on a diet2020-03-16T00:00:00+00:002020-03-16T00:00:00+00:00osteeltag:tech.osteel.me,2020-03-16:posts/docker-for-local-web-development-part-2-put-your-images-on-a-diet<p>By using standard Linux distributions, we embark a lot of tools and services we don't always need, unnecessarily increasing the size of the images in the process. In turn, this has an impact on performance, security and, sometimes, the cost of deployment.</p>Docker for local web development, part 1: a basic LEMP stack2020-03-04T12:16:00+00:002020-03-04T12:16:00+00:00osteeltag:tech.osteel.me,2020-03-04:posts/docker-for-local-web-development-part-1-a-basic-lemp-stack<p>I trust you already read the introduction to this series and are now ready for some action. The first thing to do is to head over to the Docker website and download and install Docker Desktop for Mac or PC, or head over here for installation instructions on various Linux distributions.</p>Docker for local web development, introduction: why should you care?2020-03-04T12:04:00+00:002020-03-04T12:04:00+00:00osteeltag:tech.osteel.me,2020-03-04:posts/docker-for-local-web-development-introduction-why-should-you-care<p>Among developers, exposure to Docker ranges from having vaguely heard of the technology to using it on a daily basis, the latter category singing its praises while the former is sometimes still struggling with the sheer concept of containers.</p>Talking about Collections at PHP Quebec2019-06-29T00:00:00+01:002019-06-29T00:00:00+01:00osteeltag:tech.osteel.me,2019-06-29:posts/talking-about-collections-at-php-quebec<p>Who knew Collections were so popular? After Laravel Montreal last month, I will be speaking about Collections again at PHP Quebec on July 4.</p>Talking about Collections at Laravel Montreal2019-05-28T00:00:00+01:002019-05-28T00:00:00+01:00osteeltag:tech.osteel.me,2019-05-28:posts/talking-about-collections-at-laravel-montreal<p>I have been a bit busy since I moved to Montreal back in February last year and one of the things I've been doing is regularly attending Laravel Montreal meetups.</p>Having issues with your cordless Logitech Unifying device on MacOS? Don't throw it away just yet2017-09-21T00:00:00+01:002017-09-21T00:00:00+01:00osteeltag:tech.osteel.me,2017-09-21:posts/having-issues-with-your-cordless-logitech-unifying-device-on-macos-dont-throw-it-away-just-yet<p>The cordless Logitech Unifying devices can be a bit funny when it comes to MacOS Sierra, be it the scrolling acting weird or the device not being detected altogether. Follow these quick steps to hopefully fix your problem.</p>UK Contractors: should you switch off the Flat Rate Scheme?2017-03-26T00:00:00+00:002017-03-26T00:00:00+00:00osteeltag:tech.osteel.me,2017-03-26:posts/uk-contractors-should-you-switch-off-the-flat-rate-scheme<p>With the new fiscal year just a few days ahead, as a contractor you've probably heard about the Budget changes. And if you are like me up until a few days ago, you might not be sure whether you should take action or not. Let's try and bring some clarification to these changes.</p>Contracting in the UK: a tax breakdown2016-12-22T00:00:00+00:002016-12-22T00:00:00+00:00osteeltag:tech.osteel.me,2016-12-22:posts/contracting-in-the-uk-a-tax-breakdown<p>When I started contracting about a year and a half ago, I absolutely didn't want to have to deal with anything accounting-related. Which is fine really, as getting an accountant is highly recommended anyway - for various good reasons - and there is a plethora of companies on the market that do just that.</p>How to enable NFS on Laravel Homestead2016-01-19T00:00:00+00:002016-01-19T00:00:00+00:00osteeltag:tech.osteel.me,2016-01-19:posts/how-to-enable-nfs-on-laravel-homestead<p>I currently work on a Laravel project composed of multiple microservices that I run locally using Homestead (box v0.4.0 at the time of writing). As I started tinkering around I noticed that requesting the different APIs was super slow, up to 20s per request, which was really unexpected (and annoying to say the least).</p>From Vagrant to Docker: How to use Docker for local web development2015-12-18T00:00:00+00:002015-12-18T00:00:00+00:00osteeltag:tech.osteel.me,2015-12-18:posts/from-vagrant-to-docker-how-to-use-docker-for-local-web-development<p>If you are somewhat following what's happening in the tech world, you must have heard of Docker.</p>How to use the fork of a repository with Composer2015-08-10T00:00:00+01:002015-08-10T00:00:00+01:00osteeltag:tech.osteel.me,2015-08-10:posts/how-to-use-the-fork-of-a-repository-with-composer<p>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.</p>Handling CORS with Nginx2015-07-19T00:00:00+01:002015-07-19T00:00:00+01:00osteeltag:tech.osteel.me,2015-07-19:posts/handling-cors-with-nginx<p>With the always wider adoption of API-driven architecture, chances are you already had to deal with cross-origin resource sharing at some point.</p>Database management with Adminer (and how to install on Homestead)2015-06-19T00:00:00+01:002015-06-19T00:00:00+01:00osteeltag:tech.osteel.me,2015-06-19:posts/database-management-with-adminer-and-how-to-install-on-homestead<p>For quite some time now I have been prefering accessing databases from the CLI, but sometimes it can feel overkill when wanting to quickly check or update something, say.</p>Laravel Homestead: debug an API with Xdebug and cURL in Sublime Text2015-05-23T00:00:00+01:002015-05-23T00:00:00+01:00osteeltag:tech.osteel.me,2015-05-23:posts/laravel-homestead-debug-an-api-with-xdebug-and-curl-in-sublime-text<p>There are a few tutorials out there about how to set up Sublime Text and Xdebug so they play nice together. The good news is that in our case, Homestead has covered the configuration of Xdebug for us: the tool is already available and reporting for duty.</p>Extending Homestead: how to customize Laravel's Virtual Machine (the example of Apache)2015-05-13T00:00:00+01:002015-05-13T00:00:00+01:00osteeltag:tech.osteel.me,2015-05-13:posts/extending-homestead-how-to-customize-laravels-virtual-machine-the-example-of-apache<p>Homestead offers a nice pre-packaged environment. But as a project grows in complexity, there will be a time where extra packages will be necessary. How to install them properly, and not to lose everything any time we need to recreate the box? How does one <em>extend</em> Homestead?</p>How to start a new Laravel 5 project with Homestead - quick reference2015-04-23T00:00:00+01:002015-04-23T00:00:00+01:00osteeltag:tech.osteel.me,2015-04-23:posts/how-to-start-a-new-laravel5-project-with-homestead-quick-reference<p>I wrote this short get-started guide mainly for my own use, to have a reference handy to quickly set up a new Laravel project with a MySQL database. But as I felt the need to write it, one might find some interest in it as well.</p>Install and deploy a Pelican blog using Fabric - Part 4: workflow, extras and conclusion2015-03-04T00:00:00+00:002015-03-04T00:00:00+00:00osteeltag:tech.osteel.me,2015-03-04:posts/install-and-deploy-a-pelican-blog-using-fabric-part-4-workflow-extras-and-conclusion<p>Alright! This was a bit of a long road, but we are finally getting there. In the previous part, we used Fabric to fully provision a server and pull our content from a Git repository. In this fourth and last part, we are going to review a complete worklow, take a few extra steps to complete our blog and conclude our journey.</p>Install and deploy a Pelican blog using Fabric - Part 3: Fabric2015-03-02T00:00:00+00:002015-03-02T00:00:00+00:00osteeltag:tech.osteel.me,2015-03-02:posts/install-and-deploy-a-pelican-blog-using-fabric-part-3-fabric<p>In part 2, we covered the installation and configuration of Pelican in our local environment. It is now time to provision our server and publish content using Fabric.</p>Install and deploy a Pelican blog using Fabric - Part 2: installation and configuration2015-02-26T00:00:00+00:002015-02-26T00:00:00+00:00osteeltag:tech.osteel.me,2015-02-26:posts/install-and-deploy-a-pelican-blog-using-fabric-part-2-installation-and-configuration<p>In part 1, we set up a local environment containing everything Pelican requires to run properly. Let's move on to the installation and configuration of Pelican itself.</p>Install and deploy a Pelican blog using Fabric - Part 1: local environment2015-02-24T00:00:00+00:002015-02-24T00:00:00+00:00osteeltag:tech.osteel.me,2015-02-24:posts/install-and-deploy-a-pelican-blog-using-fabric-part-1-local-environment<p>This series of articles will walk you through the different steps to install, setup and deploy your first Pelican blog (just like this one).</p>How to use Vagrant for local web development2015-01-25T00:00:00+00:002015-01-25T00:00:00+00:00osteeltag:tech.osteel.me,2015-01-25:posts/how-to-use-vagrant-for-local-web-development<p>This article shows how to quickly get up and running with Vagrant, to create and use local Virtual Machines as development environments, all with a single command. This is indeed written from a web developer's standing point, and...</p>How to use Vagrant on Windows2015-01-25T00:00:00+00:002015-01-25T00:00:00+00:00osteeltag:tech.osteel.me,2015-01-25:posts/how-to-use-vagrant-on-windows<p>This article shows how to deal with Windows' specificities while trying to work with Vagrant.</p>I've got a blog2014-08-19T00:00:00+01:002014-08-19T00:00:00+01:00osteeltag:tech.osteel.me,2014-08-19:posts/ive-got-a-blog<p>Yeah, finally.</p>