So as a preface to my question, I started out with Laravel 8. I'm a newbie. :p Please bear that in mind.
Ok, so most of what I've read about upgrading to Laravel 9, it is said that you should just create a new project and just copy over my project-specific files to that new directory. That's all well and fine but is not practical in my situation. I'm wondering if there is documentation somewhere out there that details the steps that are necessary to take in order to update my existing project.
I've seen this page in the Laravel docs and it does lay out some changes that you need to make to your composer.json file but then what? And is that all there is? Then just running composer upgrade/update? Are there any other steps I would need to take to get my project to run on Laravel 9? I understand that I may need to change some of the code in my project-specific files and all of that is laid out on the above-referenced page. But that is my code. I want to make sure that everything else in my project is running Laravel 9 code.
The reason I'm asking all of this is because I did take those steps on the above page and these are the changes I made to my composer.json:
"inertiajs/inertia-laravel": "^0.5.4",
"laravel/framework": "^9",
"spatie/laravel-ignition": "^1.0",
"nunomaduro/collision": "^6.0",
After all of that I ran composer upgrade. It made it through all the download, removing, upgrading, and installing but when it got to needing to run artisan for some reason, this is what I'm seeing:
54 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Error
Undefined constant Illuminate\Http\Request::HEADER_X_FORWARDED_ALL
at vendor/fideloper/proxy/config/trustedproxy.php:48
44▕ * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
45▕ *
46▕ * @link https://symfony.com/doc/current/deployment/proxies.html
47▕ */
➜ 48▕ 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
49▕
50▕ ];
51▕
+9 vendor frames
10 [internal]:0
Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(Fideloper\Proxy\TrustedProxyServiceProvider))
+5 vendor frames
16 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
So now my project is pretty much dead in the water.
I know that a product called Laravel Shift exists but a) I'd like to learn how to upgrade manually and, more importantly, b) I don't have a github repository (and I'd rather not create one solely for this purpose) for my project. So I'm wondering if there is a guide that lays out the upgrade process step by step to get my existing project running on Laravel 9. Because whatever it is that I am (or am not) doing is wrong and I'd like to make it right.
Thank you
Christoph