Problem/Motivation

The 7.x-1.x pipeline has been red since October 2024 (last green run July 2024). Two things broke:

  1. The template enables the project module before it downloads _D7_DRUPAL_TEST_DEPENDENCIES, and drush can no longer pick a release for l10n_pconfig on its own ('There are no stable releases for project l10n_pconfig', then it cancels the download because of -y). Enabling l10n_server therefore fails on its missing dependency and nothing else runs.
  2. The Drupal 7 pipeline already ran on PHP 8.1 (the _TARGET_PHP: '5.6' in .gitlab-ci.yml belongs to the modern template and is ignored). On 8.1 the test suite hits two errors in our code: the files connector passes a file name string where potx expects an integer offset (substr(): Argument #2 ($offset) must be of type int), and the translate form returns FALSE when no strings match, which core turns into a form array with a deprecation. potx 7.x-3.0 from 2020 is not PHP 8.1 compatible either; the 7.x-3.x branch is.

These are very minimal changes to the Drupal 7 branch and not expected to break the existing localize.drupal.org setup running on an older PHP version.

Steps to reproduce

  • Add a composer.json with the test dependencies in require-dev (drupal/l10n_pconfig: ^1.2, drupal/potx: 3.x-dev), which the Drupal 7 template installs from packages.drupal.org/7 and moves into sites/all/modules before enabling anything. Drop the obsolete _TARGET_PHP and _D7_DRUPAL_TEST_DEPENDENCIES variables. The PHP version stays the template default.
  • Pass the prefix length to _potx_process_file() in the files connector, like the drupal.org connector already does.
  • Return an empty array instead of FALSE from l10n_community_translate_form() when nothing matches.

With these the full L10nServerTestCase passes locally on PHP 8.1 with potx 7.x-3.x (1213 passes, 0 fails, 0 exceptions), same as on PHP 7.4.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

LLM disclosure

LLM was used to find, diagnose explain and fix this issue. With human review.

Comments

gábor hojtsy created an issue. See original summary.

  • 1cfc2823 committed on 7.x-1.x
    fix #3621211: 7.x-1.x GitLab CI fails since October 2024: test...
gábor hojtsy’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.