drupal-project icon indicating copy to clipboard operation
drupal-project copied to clipboard

Remove php version from composer.json

Open kevinquillen opened this issue 6 years ago • 5 comments

Including this line in composer.json causes PHPStorm to lock certain settings like setting your PHP language level.

When I removed "php": ">=5.6", and ran composer update --lock, I could then set my language level in PHPStorm, pictured below.

screen shot 2019-02-13 at 2 04 40 pm

I think this might be a bug related to Composer/PHPStorm, but it is not a simple thing for others to find, particularly when they are configuring aspects of PHPStorm for development.

kevinquillen avatar Feb 13 '19 19:02 kevinquillen

This seems like as good a place as any to note that, now that the Drupal version is 8.7, that requirement should be >=7.0 (if present at all).

johncronan avatar May 08 '19 19:05 johncronan

I wouldn't necessarily consider this a bug - you can override this in PHPStorm: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000794610-When-marking-sources-PhpStorm-automatically-returns-to-previous-settings-on-restart?page=1#community_comment_115000659650

The default is very useful in that it prevents you from using language level features that don't fit the Drupal minimum requirements.... assuming you plan on contributing your code back to the community.

cybtachyon avatar Jul 26 '19 17:07 cybtachyon

It is a bug because it interferes with IDE settings, requiring a user to have to go track that down, as opposed to bumping it (mentioned in that very same link). It would not allow me to do anything at all, and it wasn't clear why or how to rectify that from the IDE.

Even so, at this date:

Drupal 8 will require PHP 7 starting May 1, 2019, on the day of the release of Drupal 8.7.0.

So it sounds like it should be bumped in accordance anyway.

kevinquillen avatar Jul 26 '19 17:07 kevinquillen

Allready moved up to 7.0.8 with #518

j3ll3nl avatar Oct 22 '19 07:10 j3ll3nl

Core 8 composer.json has "php": "^7.0.8" and core 9 composer.json has "php": ">=7.3.0" already. So I guess that should already be enough actually.

We could move the PHP requirement to the platform reqs like drupal/drupal does it. How does that sound?

Ping @webflo @jcnventura

normanlolx avatar Jan 12 '21 21:01 normanlolx