Hi,
I was on version v4.5.47, and I’m trying to upgrade to version 5. It says you “upload the files OVER the current ones”). I’ve done that, but I get an error:
2023/06/13 15:01:35 [error] 260647#260647: *1551274 FastCGI sent in stderr: "PHP message: PHP Fatal error: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /home/me/web/invoices.me.co.uk/vendor/symfony/translation/TranslatorInterface.php on line 69" while reading response header from upstream, client: 81.174.134.33, server: invoices.me.co.uk, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.0-fpm-invoices.me.co.uk.sock:", host: "invoices.me.co.uk"
I’m not too sure what to do? I did try the web-based update first, but it died with a 500 IS error
UPDATE: I read somewher to try this:
composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires php ^8.1 but your php version (8.0.28) does not satisfy that requirement.
Problem 2
- Root composer.json requires spatie/laravel-data ^3.5 -> satisfiable by spatie/laravel-data[3.5.0, 3.5.1, 3.6.0].
- spatie/laravel-data[3.5.0, ..., 3.6.0] require php ^8.1 -> your php version (8.0.28) does not satisfy that requirement.
Problem 3
- symfony/mailgun-mailer[v6.1.0-BETA1, ..., 6.4.x-dev] require php >=8.1 -> your php version (8.0.28) does not satisfy that requirement.
- Root composer.json requires symfony/mailgun-mailer ^6.1 -> satisfiable by symfony/mailgun-mailer[v6.1.0-BETA1, ..., 6.4.x-dev].
I have the frontend set as 8.1, but it seems to think I’m on 8.0 when running from CLI. Is there a way to explicitly tell compose to use 8.1?
UPDATE 2: Ok, I’m getting a bit closer - I set
"config": {
"platform": {
"php": "8.1"
},
....
}
in the composer.json file. Then I run
composer update
This worked - but I still get an error when trying to run InvoiceNinja
2023/06/13 15:22:14 [error] 260647#260647: *1552215 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/me/web/invoices.me.co.uk/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:335
Stack trace:
#0 /home/me/web/invoices.me.co.uk/app/Exceptions/Handler.php(99): Illuminate\Support\Facades\Facade::__callStatic()
#1 /home/me/web/invoices.me.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(481): App\Exceptions\Handler->report()
#2 /home/me/web/invoices.me.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(136): Illuminate\Foundation\Http\Kernel->reportException()
#3 /home/me/web/invoices.me.co.uk/public_html/index.php(57): Illuminate\Foundation\Http\Kernel->handle()
#4 {main}
thrown in /home/me/web/invoices.me.co.uk/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 335" while reading response header from upstream, client: 81.174.134.33, server: invoices.me.co.uk, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.1-fpm-invoices.me.co.uk.sock:", host: "invoices.me.co.uk"
Thanks!
Andy