The problem is not Dolibarr 17; it’s PHP +8 (8.0, 8.1, or 8.2). Although Dolibarr 17 has been “prepared” to be compatible with PHP 8.X, it will continue to encounter new issues due to incompatibility.
The reason is that from 7.X to 8.X, the PHP team decided to deprecate “a lot of” things (forbidden to use, causing an error if used). These are usually minor things that can be easily replaced by the current approved syntax. However, these small issues are scattered throughout the code, especially in a large codebase like Dolibarr.
Please note that this situation also affects third-party modules. So, usually, Dolibarr (or any other CMS) becomes broken due to certain third-party modules that have not been properly upgraded!
In these cases, the best recommendation is to DISABLE all third-party modules BEFORE UPGRADING. Well, in fact, the best suggestion is to TEST THE UPGRADE ON ANOTHER SERVER and address any issues that arise there before making the same changes on your production system.
I don’t want to be a spoilsport, but let me say that the HARD PART of using open-source server software is not downloading and installing it… the hard part is dealing with updates!! Especially major updates like this one for PHP. That’s why some of us provide value as providers to other companies by installing and administering servers and the software installed on them
Having said that, just this week, I had to change my hosting provider to gain access to a VPS with root access where I could run an obsolete PHP version (7.4, which no longer receives security updates since January 2023!!) due to these kinds of “minor” incompatibilities between Dolibarr (and third-party modules) and PHP 8.X
Honestly, I don’t have much time these days to deal with these kinds of errors in my customers’ Dolibarr installations. So, I prefer to migrate to PHP 8.1 in the next few months.
But hey, I’ll try to provide some help to other users here if I can