diff --git a/README.md b/README.md index 395b7aa917..adc47c71ad 100644 --- a/README.md +++ b/README.md @@ -132,12 +132,14 @@ Follow the instructions in the [documentation on drupal.org](https://www.drupal. ### How do I specify a PHP version ? -Currently Drupal 8 supports PHP 5.5.9 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+. +This project supports PHP 5.6 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+. To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: ```json "config": { "sort-packages": true, - "platform": {"php": "5.5.9"} + "platform": { + "php": "5.6.40" + } }, ``` diff --git a/composer.json b/composer.json index 9681a1d967..9aa3dbd877 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ } ], "require": { + "php": ">=5.6", "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5",