PHPnews.io

Overview for 'stitcher-io'

The birth and death of a framework

Written by Stitcher.io / Original link on Sep. 16, 2021

This post was first released on my newsletter. Feel free to subscribe if you want to be the first these kinds of posts, and want to talk about about them with me directly via email. Every once in a while, maybe every couple of years, someone has an idea that revolutionises the tech industry. All po…


PHP 8.1: readonly properties

Written by Stitcher.io / Original link on Sep. 11, 2021

Writing data transfer objects and value objects in PHP has become significantly easier over the years. Take for example a look at a DTO in PHP 5.6: class BlogData { /** @var string */ private $title; /** @var Status */ private $status; /** @var \DateTimeImmutable|null */ private $publishedAt; /** *…


My IKEA clock, and software design

Written by Stitcher.io / Original link on Sep. 1, 2021

This is my bedside clock: I've had this IKEA clock for 14 years now — that's half my life. And it's one of those things I'll be really sad about the day it stops working. Why? This clock is a beautiful example of perfect design. Not because it's pretty, but because it's simple, has a clear goal, co…


re: On using PSR abstractions

Written by Stitcher.io / Original link on Aug. 31, 2021

Yesterday, I read Matthias Noback's excellent blog post on PSR abstractions, and I'd like to share some thoughts on the topic as well. I'm going to quote the parts I want to answer, but make sure the read the full post if you want more information about Matthias' point of view. I want to make clear…


Named arguments and open source projects

Written by Stitcher.io / Original link on Aug. 26, 2021

There are a few well known open source maintainers within the PHP community against the use of named arguments, citing maintenance overhead and backwards compatibility problems as reasons not wanting to use them. I want to nuance those arguments a little bit. # What's causing backwards compatibilit…


Rational thinking

Written by Stitcher.io / Original link on Aug. 25, 2021

Now and then, I like to ask a simple coding style question on Twitter. It usually goes something like this: do you write FQCN's (fully qualified class names) in your doc blocks or not? In other words, do you write code like this: /** @var \App\Models\Foo[] */ $arrayOfFoo = … Or like this: /** @var…