Hey guys, in the composer.json file for a fresh laravel installation the php line is like so:
"php": "^7.3|^8.0"
im not sure why it is done like this, I use sail and it pulls in a php 8 docker image, but when I open in php storm, it syncs to composer.json but goes with php 7.3 and as a result I cant use php 8 related functions like converting into an arrow function
phpstorm support told me to just remove 7.3 from composer.json, but I assume there is a reason why its there right?
@michalis it's php versions compatibility. It allows other team members who have php 7.3 on the machine still use you application. Or allows you to have php 7.3 on server, for example
Of course, you can't use php8 functions this way.
You are free to remove php 7 support from composer.json if all your team members use php8 and on the server you'll have php8