Fix PHPUnit GitLab CI job for previous major

Created on 27 April 2024, 7 months ago

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

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany hctom

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024