Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | Put PHP version requirement under quotes-3089837-2.patch | 410 bytes | zvonimirr |
Comments
Comment #2
zvonimirrComment #3
mkalkbrennerMaybe 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-...
Comment #4
mkalkbrennerhttps://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
Comment #6
mkalkbrenner