PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave

Created on 10 November 2020, almost 4 years ago
Updated 25 February 2023, over 1 year ago

Problem/Motivation

\Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() can produce a regex that fails on certain PHP builds.

Steps to reproduce

Set pcre.jit to 1 and run \Drupal\KernelTests\Core\Installer\InstallerLanguageTest::testInstallerTranslationFiles()

We've tried testing this on drupalci - see #2 - but it does not fail in the way it does locally. https://3v4l.org/m091V also shows that its PHP builds are not affected - interesting PHP 8 alpha 2 had a bug here...

Proposed resolution

Fix the regex returned by \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() to work regardless of compiled pcre version.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

🐛 Bug report
Status

Fixed

Version

8.9 ⚰️

Component
Base 

Last updated about 4 hours ago

Created by

🇬🇧United Kingdom alexpott 🇪🇺🌍

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024