Skip to content

Commit

Permalink
Add platform version to FAQ to help user specifying PHP version, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tostinni authored and shrop committed Apr 11, 2020
1 parent 3f5e7f4 commit 42a8e92
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,15 @@ section of composer.json:
### How do I switch from packagist.drupal-composer.org to packages.drupal.org?

Follow the instructions in the [documentation on drupal.org](https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg).

### 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+.

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"}
},
```

0 comments on commit 42a8e92

Please sign in to comment.