How to configure the Composer to always download the latest version? - laravel

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.

Related

Why i cannot install Laravel Breeze

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.

Laravel installer not installing latest version

I have attempted installing Laravel 5.7 with the Laravel installed and composer create-project but both install 5.6.34
I have specified the 5.7.0 and dev-develop branch in my composer command. When I specify 5.7.0 I get the following exception:
Could not find package laravel/laravel with version 5.7.*
When I specify dev-develop it installs 5.6.34 - I assume 5.7 has been released as it is available on the Laravel website with upgrade instructions.
Anyone know what's happening here?
Laravel 5.7 is not officially released yet, but you can get the latest commit from github master branch like this:
composer create-project laravel/laravel:dev-master myproject --dev

spatie/laravel-newsletter doesn't work on laravel 5.4

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

laravel homestead - different php version

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

Laravel - Installing packages for older version

I am trying to install a package (https://github.com/ollieread/multiauth), and the site says that i requires Laravel 4.1. I am running Laravel 4.2, and so when I run composer update I get
Your requirements could not be resolved to an installable set of packages.
Why can't I install this on a higher version of Laravel?
You can't install it on higher version of Laravel is because it's been just only support for 4. 1. * of Laravel Version according to their composer.json

Resources