The cleanest upgrade path I could devise with my blunt force devops style after a few failed attempts, was just to full on remove PHP 8.0 and then install 8.1 afterwards. In this case 8.0 was installed via the ppa:ondrej/php prior and there is no good way to do a straight normal upgrade as these PHP packages are annoyingly to me, built to be installed side-by-side.
This is a statement that has been in my Twitter bio for a while now and over the years it has seen some minor variations, with the latest trying to be a little less inflammatory adding "kinda" and "if you think about it" - every now and then someone will ask and it seems to be something people do actually think about, and then still miss the point. Lets longform this thing in the true style of my rant driven development blog.
Personally there are a few times where I tend to screw up with Composer for PHP the most. At the high level its going to be very obvious that the main reason for these comes from versioning. It's a pain in the ass to say yes my app can use v1, v2, v4, but not v3. Once you leave the small set of packages directly related to Composer itself, very few are sitting there juggling version constraints in the real world. Most version constraints are set expecting "features could ever be removed or broken from this point on" and nothing is ever going to fix that human problem, leaving the [...]
At first this was a feature I was excited for. After using it, I've changed my mind about it. Constructor property promotion was added so that you could pass an argument to a class constructor, and it would get auto assigned to a property, without you having to do $this->That = $That in your constructors over and over.