Downgrade de package em laravel

Question:

I'm having a problem running composer install due to a package that is incompatible with the laravel version I'm currently using;

The version I have is 4.1 with php 5.6, however when I run the install I get the message;

illuminate/support v5.5.2 requires php >=7.0 -> your PHP version (5.6.32) does not satisfy that requirement.

Unfortunately someone updated the package and now I can't install it in the right environment anymore. How can I downgrade the packages to be compatible with the current version of laravel? (4.1)

Answer:

I would do it like this:

  • Remove the package with the composer remove illuminate/support command
  • Clear the cache with the composer clear or composer clear-cache command. This is important because, when installing again, Composer usually tries to get the version that is in the cache.

  • Run the composer require illuminate/support 4.1.* command

Scroll to Top