We are using the latest homestead, where you can fill in the php version in homestead.yml.
I installed php 7.0 with "sudo apt-get install php7.0-fpm".
But from my point of view this php version is not used in my project.
I did a composer update and it takes php 7.1 as basis for the composer.lock.
How to use the php version 7.0 for my composer?
to check what is you cli php version run
php -v
to change it to php 7.0 run
php70
Related
After uploading my Laravel version 8.5 files. I keep getting this display instead of the landing page:
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2".
I've run the following commands:
a2dismod php7.4
a2enmod php8.1
service apache2 restart
update-alternatives --set php /usr/bin/php8.1
update-alternatives --set phar /usr/bin/phar8.1
update-alternatives --set phar.phar /usr/bin/phar.phar8.1
I've also restarted Apache with:
/etc/init.d/apache2 restart
But I keep getting the same display, even after clearing my browser cache.
I'm sure Apache is still referencing the former PHP version according to:
phpinfo()
Full Disclosure:
I'm not proficient with Linux. My OS is Ubuntu 20.04, while my old PHP version is 7.4.29 and new PHP version is 8.1
Had the same issue. Found that there were multiple versions of php installed and Apache was referencing one of the former PHP versions. Disabled each former version using a2dismod until the right version was being referenced. Hope this helps.
Try to update your php version in your composer.json file.
"require": {
"php": "^8.0.2"
}
and then run composer update.
I don't think it's your PHP that's the problem. I think it is your Composer configuration. Composer is the link between your PHP and your apps. See How to solve Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2"
I installed a fresh laravel application using version 7.30.4. When I tried to install laravel breeze, using command composer require laravel/breeze --dev, it gives me this error.
[InvalidArgumentException]
Package laravel/breeze has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version
My current version of PHP is 7.2.19
This error comes due to compatible version in your composer.json file. To fix this issue, change the composer.json file "platform" configuration:
"platform": {
"php": "7.3"
}
Then execute composer install or composer update
or you can run the below command:
composer config platform.php 7.4.3
Laravel breeze required PHP version 7.3 and as you said your PHP version is 7.2.19 so you have to update it.
I have install laravel Laravel Framework 6.7.0 in local machine. I have working redis queue and jobs. but i have install horizon using this link https://laravel.com/docs/6.x/horizon. but i have not install .
I have atteched sceenshort below Please check.
As the output Using version ^4.2 for laravel/horizon states composer tries to install version 4 of laravel/horizon - which is Laravel7 only. You need to install version 3, which is compatible with Laravel6:
composer require laravel/horizon ^3.0
My composer is downloading version 5.4.36. How to configure the Composer to always download the latest version.
Laravel 5.4 is the latest version with PHP 5.6 support.
Laravel 5.5 requires PHP 7.0, Laravel 5.6 requires PHP 7.1.
Here is the image below
See the image of composer command
Because the latest version is to be used on 5.5.
You can pull an older version if you want:
composer require spatie/laravel-newsletter 3.7.0