Skip to content

Commit 6d886d9

Browse files
tostinniwebflo
authored andcommitted
Add platform version to FAQ to help user specifying PHP version, fixes drupal-composer#359. (drupal-composer#360)
1 parent e34719c commit 6d886d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,15 @@ section of composer.json:
129129
### How do I switch from packagist.drupal-composer.org to packages.drupal.org?
130130

131131
Follow the instructions in the [documentation on drupal.org](https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg).
132+
133+
### How do I specify a PHP version ?
134+
135+
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+.
136+
137+
To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:
138+
```json
139+
"config": {
140+
"sort-packages": true,
141+
"platform": {"php": "5.5.9"}
142+
},
143+
```

0 commit comments

Comments
 (0)