[Bug] Method Laravel\Nova\Http\Requests\NovaRequest::schemeAndHttpHost does not exist
Closed this issue · 7 comments
I'm getting this error when trying to use 2.1
My Laravel Nova is frozen at 4.22.2
because that's when my 1 year of free updates has expired.
I wonder if the schemeAndHttpHost
method was only added afterwards?
I don't understand why else I would be getting this error. My calendar does not load at all as a result.
Would it be possible to make your package compatible with Laravel Nova 4.0 and not depend on a new method that many people won't have access to unless they have an active subscription? If that is even the problem.. if you have any other ideas I'd love to hear them.
Many thanks for your continued development!
Great point, thanks for reporting! I'm looking into it and will at the very least update the dependency info, but will try to find a fix to get backwards compatibility going if needed.
What version of Laravel are you using?
I've just downgraded my local installation to 4.22.2 to investigate, but I'm not seeing any errors running version 2.1 of this package.
The schemeAndHttpHost
seems to be inherited from Symfony through Laravel so doesn't appear to have too much to do with Nova itself.
Any chance this is going wrong elsewhere?
Yes.. it seems I misidentified the problem.. I'm on Laravel 8 and I believe that method was only introduced sometimes during Laravel 9. I'm in the process of updating to Laravel 10 which I expect will fix the problem.. having some dependency issues but I'll report back here once I can confirm that this is what it was.
Yeah please do update later! Will be good to know and have documented here.
According to ChatGPT 4, the schemeAndHttpHost
request method was introduced in Laravel 5.1, fwiw.
Hrm.. I think it was added to the Symfony request class a long time ago but only added to the Illuminate request class later.
Anyway I can now confirm that on Laravel 8 I was getting this error and now that I'm on Laravel 10 all is working well!
Great, thanks for the update!
I'm still curious what was the exact cause, because the Illuminate Request simply subclasses the Symfony Request, and it did so in Laravel 5.1 already, which used Symfony 2.7, which already had the getSchemeAndHttpHost
in it. So I'd be surprised if this were a mere compatibility issue with regard to that method.
But I understand if you don't want to investigate any further, glad it works :)!
Since I didn't encounter this issue running nova-calendar 2.1 under Nova 4.22.2, I'll be marking this issue as invalid, but I'll keep in mind that there's possibly a compatibility issue with regards to Laravel 8.
If anyone else is encountering compatibility issues with regard to using nova-calendar under Laravel 8, please open a new issue so we can investigate further.