I have managed to get php v8 working and my URL Rewrites working (I think) on my Grav site on Windows 10 IIS 10.0
I downloaded a skeleton, and extracted the files into my wwwroot folder.
When I browse to the site I get the following error: 0 - syntax error, unexpected token "match"
I turned on full backtrace for error logging and the issue seems to lie in the C:\inetpub\wwwroot\grav-skeleton-landio-site\vendor\willdurand\negotiation\src\Negotiation\Negotiator.php file:
I just registed to reply because I had the same problem. The issue is that in php8 the Match word used in willdurand/negotiation is reserved so it fails. You have to use +3.0.0 version.
Edit your composer.json and replace something like:
âwilldurand/negotiationâ: â^2.3â
with:
âwilldurand/negotiationâ: â^3.0â
Then reinstall composer dependencies and it should work.
Thanks @anon76427325 ! You are right. Itâs always bettter to upgrade Grav. I use Grav ocasionally and I didnât knew there was a new version shipping v3.0 of the negotiation library.
Thank you for taking the time for writing this. Iâm sure it will help other users.
Thanks for the responses everyone!
Iâve been AFK, and will try to upgrade everything as suggested when I get a chance. Appreciate that the community is so active.