EDIT: The below only worked for one upgrade now regardless, I am experiencing this error with the self updater.
I’m aware that Invoice Ninja hasn’t officially been updated for PHP8.1 but I just wanted to report that if PHP8.1 is set as the default for CLI (which will happen if PHP8.1 gets installed on a server) then the built in updater will fail with FormatException: SyntaxError: Unexpected end of JSON Input.
This probably makes sense since there would be syntax changes in PHP8.1 compared to previous versions but the reason for this error could be confusing if someone encounters it.
To resolve this and get the built in updater working again, I simply changed the PHP CLI version back to 7.4 by using sudo update-alternatives --set php /usr/bin/php7.4
PHP 8.0 would probably also work.
After setting this, the built in InvoiceNinja updater is working correctly for now.
Personally I think a message should be thrown to the user if InvoiceNinja detects PHP8.1 being used for InvoiceNinja at this stage as I’ve experienced multiple incompatibilities with it and InvoiceNinja. Is there an ETA for PHP8.1 support?