PHP 8.2 support

Created on 23 April 2025, 2 days ago

Problem/Motivation

* PHP 8.1 & 8.2 support was dropped in commit 2.0.3 by adding "php": ">=8.3" in composer.json.

This blocks installation of the module on sites still running PHP 8.1 or 8.2.
The source code itself is fully compatible with PHP 8.1+:
No dynamic-property creation (8.2 deprecation) found.
No PHP 8.3-only features used (typed constants, json_validate(), mb_str_pad(), #[Override], …).
All three runtime files—LinkMediaLibraryAddForm.php, MediaEntityLink.php, media_entity_link.module — run cleanly under 8.1, 8.2 and 8.3 with error_reporting = E_ALL.

Dropping 8.1/8.2 support therefore seems unintentional and causes needless blockers for projects still on those versions.

Steps to reproduce

On a site running PHP 8.2 (or 8.1) this module can't be updated to 2.0.3.

Proposed resolution

Add php 8.2 & even 8.1 support in composer.json
"^8.1 || ^8.2 || ^8.3" OR ">=8.1"

Remaining tasks

Apply the above diff to composer.json and bump module version number.
Run CI (DrupalCI/GitLab) against PHP 8.1, 8.2 and 8.3 to lock in coverage.
Tag and release a new version.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

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