Remove composer requirement to prevent PHP MAX tests from crashing

Created on 9 August 2024, 8 months ago
Updated 23 August 2024, 8 months ago

Problem/Motivation

Build pipelines are now failing on the 2.0.x branch 🔴
See pipeline: https://git.drupalcode.org/project/block_class/-/pipelines/249211

due to the phpunit (max PHP version):
https://git.drupalcode.org/project/block_class/-/jobs/2396054

Looking at the console output of the job, the following error appeared:

Could not use "\Drupal\Tests\Listeners\HtmlOutputPrinter" as printer: class does not exist

Which looks like a version compatibility issue: Certain dependencies, libraries or packages couldn't be installed or found.

However, running the tests for branch: 3.0.x, would not produce the same issue.

Looking a bit further at module's core version requirements and dependencies, the only difference between the two branches in terms of declared dependencies and version requirements would be the require section in the 2.0.x branch's composer.json.

After doing a quick test in an older issue fork, with a debugging branch, I found removing the require section would allow getting the right versions and dependencies to run the tests.

Steps to reproduce

Build > Pipeline > Run pipeline :
https://git.drupalcode.org/project/block_class/-/pipelines
Select branch: 2.0.x

Proposed resolution

Remove the require section from the composer.json file.

The dependencies and version requirements should be properly resolved based on module's core_version_requirement in the block_class.info.yml file.

🐛 Bug report
Status

Fixed

Version

2.0

Component

SimpleTests

Created by

🇫🇷France dydave

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