Get the right version of Laravel or Lumen

Get the right version of Laravel or Lumen

If, like me, your production server runs an older version of PHP then you need to install the correct version of Laravel or Lumen on your development server.

For example PHP version 7.0.* would need version 5.5.* of Laravel or Lumen



composer create-project laravel/lumen [project-name] "5.5.*"



composer create-project laravel/laravel [project-name] "5.5.*"


In addition I had some other problems with Laravel 5.5.* and PHP 7.0 which meant I had to amend the composer.json file with these in the "require": section


        "symfony/translation": "3.4.28",

        "doctrine/inflector": "1.2.0",

        "symfony/css-selector": "3.4.28",

        "symfony/event-dispatcher": "3.4.28",

        "doctrine/instantiator": "1.0.5",

        "myclabs/deep-copy": "1.7.0"

In this case don't forget to delete your composer.lock file and then run "composer update" from the project root


If you are developing using homestead you need to update your Homestead.yaml file.

The section that starts with


        - map: example.test
          to: /home/vagrant/Code/path/to/public
          php: "7.0"

It's the bit with php:"7.0" you need to add. This ensures your development environment is running PHP 7.0