-1

In my case I use webklex/laravel-imap.

I had v1.4.1 after I run composer update webklex/laravel-imap it updated to v1.6.2, but there is already version 2.1.1, which I want to use.

It seems that composer update tries to maintain compability, but how would I correctly update to the newest version?

I tried composer require webklex/laravel-imap, which gave me an error:

PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar
Roman
  • 3,563
  • 5
  • 48
  • 104

1 Answers1

1

composer require would be enough to update the version but it makes memory exhaust limit so often. if the newer version is compatible with your laravel version then update composer.json file with your desired version in require object like

"webklex/laravel-imap": "^2.1"

and then run

composer update webklex/laravel-imap

composer update does not make memory exhaust limit so often but in case you again get memory exhaust error you have to update your composer memory limit, heres an answer how to do that.

zahid hasan emon
  • 6,023
  • 3
  • 16
  • 28
  • 3
    Beware that using `composer update` will also update all other dependencies to the latest available versions matching the requirements, which may be an issue. Running `composer update webklex/laravel-imap` is therefore safer. – Jeto Oct 16 '20 at 13:37