Php has both cli and web, and it sounds link you have only changed the cli version.
Are you by any chance using valet? https://laravel.com/docs/8.x/valet#php-versions
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I have huge problem Laravel project require php version > 7.4. My Mac has preinstalled php version 7.3. I installed php version 7.4 with home-brew (in terminal I checked php -v, it showed 7.4). Then I do composer update in my Laravel project, everything go fine. I start "php artisan serve" and it shows me php 7.4, that's fine, but when I do requests to me Laravel project I get this error Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.24-(to be removed in future macOS). How to solve this problem?
Please or to participate in this conversation.