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

[Test] Tests for PHP 5.6 and 5.5.9 fail due to incompatible dependency.

Open melvinversluijs opened this issue 4 years ago • 1 comments

[Test] Tests for PHP 5.6 and 5.5.9 fail due to incompatible dependency.

Problem/Motivation

A couple of days ago I submitted a PR for a different issue and noticed that the test failed for PHP 5.6 and PHP 5.5.9. Which should not have happened since I did not change anything which is not compatible with these versions of PHP. So I went to Travis to check out why it failed.

How to reproduce

Just rerun the Travis test for the current master branch or any feature branch that has been branched from the current master branch.

Solution

The issue seems to have been caused by the Drupal Token module which is installed on line 71 of the travis.yml file. This module is installed on version 1.6 which is compatible with Drupal 8.7.7 and up. However for PHP 5.6 and 5.5.9 Drupal version 8.6 is installed (line 44 of .travis.yml file).

The test fails with:

In InfoParserDynamic.php line 29:
                                                                        
  [Drupal\Core\Extension\InfoParserException]                           
  Missing required keys (core) in modules/contrib/token/token.info.yml  

because the core property in token.info.yml (of the Drupal token module) has been changed to core_version_requirement (introduced in Drupal 8.7.7).

The solution should be either use v1.5 of the Drupal token module or use a newer Drupal version for php 5.6 and 5.5.9. However since I am not to knowledgeable about this setup I was hoping that someone else could have a look at it.

melvinversluijs avatar Mar 20 '20 09:03 melvinversluijs

I've found the same thing just now (caused by drupal/admin_toolbar).

These are modules whose latest version requires Drupal 8.8+, but which are for some reason installed even on Drupal 8.6 (which is used on the PHP5 builds). Drupal 8.6's info parser cannot handle the 8.8+ only info file format and crashes; this should have already been stopped by composer before the package was installed.

I've reproduced this locally - checking out 8.5.15 and running composer require drupal/admin_toolbar installs version 2.2.0, even though that package has require: drupal/core:^8.8 in its composer.json.

I believe this is a bug in Drupal's composer directives (but I don't know enough about those to figure out how to solve it), which can be worked around for now by ensuring that the legacy builds specify 8.6-compatible versions of the Drupal modules they're installing.

Reported the bug here: https://www.drupal.org/project/infrastructure/issues/3137928

cburschka avatar May 19 '20 16:05 cburschka