I've come across an issue with the info.yml file where if the php key is written as a number (without quotes for example), it gets converted to a floating-point number and Drupal modules list form fails the version compare check.
For example 7.1 gets read as 7.1000000000004, when in reality it should be '7.1' or 7.1.0
If we compare 7.1 and 7.1000000000004, version_compare returns -1 and therefore I cannot install the module even if I switch to 7.2.
I'll attach a patch for anyone who might be facing the same problem as I am.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zvonimirr00 created an issue. See original summary.

zvonimirr’s picture

mkalkbrenner’s picture

Maybe it depends on the YAML parser.

You should fix the documentation as well: https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-...

mkalkbrenner’s picture

https://git.drupalcode.org/project/geocoder/blob/8.x-3.x/geocoder.info.yml

I think adding the patch level will solve the issues, too:
php: 7.1.3

  • mkalkbrenner committed 78868c6 on 8.x-3.x
    Issue #3089837 by zvonimirr00, mkalkbrenner: PHP Requirement error
    
mkalkbrenner’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.