Problem/Motivation

Currently the PHPUnit job for previous major tests in GitLab CI fail with the following error (due to PHP 7.4 being used):

There was 1 error:
1) Drupal\Tests\view_mode_switch\Functional\ViewModeSwitchDiffTest::testViewModeSwitchDiff
ParseError: syntax error, unexpected ')', expecting variable (T_VARIABLE)
/builds/project/view_mode_switch/web/modules/contrib/diff/src/DiffBuilderManager.php:77

It originally happens in diff module's code, which is a dev dependency of this module for tests. It uses a trailing comma in constructor parameters list, which is only available since PHP 8.0 (but diff module unfortunately does not require at least PHP 8).

Steps to reproduce

See current PHPUnit Gitlab CI pipelines

Proposed resolution

  • Ensure PHP 8 is used for previous major tests

Remaining tasks

  • Create issue fork and MR to fix this issue

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hctom created an issue. See original summary.

hctom’s picture

Issue summary: View changes
hctom’s picture

Title: Fix PHPUnit pipelines for previous major » Fix PHPUnit GitLab CI job for previous major

  • hctom committed 83a44848 on 2.x
    Issue #3443897 by hctom: Fix PHPUnit GitLab CI job for previous major
    
hctom’s picture

Status: Active » Fixed

This is fixed by using the maximum supported PHP version for previous major tests now.

hctom’s picture

Status: Fixed » Closed (fixed)