Wednesday, March 13, 2019

Laravel Project Version Downgrade

If your server doesn't have php 7.1 and above and you are only restricted to use php7.0 do as below:
  1. Delete vendor folder
  2. Delete composer.lock file
  3. Add this to composer.json file under config
    "platform": {
       "php": "7.0.0"
    }
As well, ensure PHP version under require is set to 7.0.0 as shown below in config.platform.php:
    "config": {
        "platform": {
            "php": "7.0.0"
        }
     }
  1. Run composer install using CMD
  2. composer install --ignore-platform-reqs 

    if you get the error: 
    This package requires php >=5.5.9 but your PHP version (5.5.6)
       does not satisfy that requirement.
     

This now will make sure that only dependencies compatible with php7.0 are installed

No comments:

Post a Comment