In my local dev app my server (Laragon/Apache) and the Laravel app correctly show PHP 8.1.10, but in my Windows CLI, PHP -v shows 7.4.8. My environment variables however show the path to PHP 8.1.10, no reference to any other version, so I can’t determine where the terminal is picking up this version and why. Usually this would be fixed in the $PATH environment variable, but it is fine and doesn’t show a path to PHP 7.4.8
The net result of this is Composer will not run for me because of the following error – Root composer.json requires PHP ^8.1 but your PHP version (7.4.8) does not satisfy that requirement.
I can’t see how to resolve this and force the system/CLI to point to PHP 8, and seems until I do I’m dead in the water.
Any suggestions?