Set minimum PHP version in composer.json

Created on 24 October 2025, 13 days ago

Problem/Motivation

The latest stable release 1.1.3 says it is works with Drupal ^10.3 || ^11. Per Drupal's PHP requirements , it is possible to run Drupal 10.3 through 10.5 with PHP 8.1+. In Improve classes UI Active typed class constants were introduced. This feature requires PHP 8.3+. A site running Drupal 10.5 on PHP 8.1 throws a fatal error when using LMS 1.1.3

ParseError: syntax error, unexpected identifier "CLASS_NO_STATE", expecting "=" in Composer\Autoload\{closure}() (line 20 of /var/www/html/web/modules/contrib/lms/modules/lms_classes/src/Service/ClassNameGenerator.php).

This comes from web/modules/contrib/lms/modules/lms_classes/src/Service/ClassNameGenerator.php:

final class ClassNameGenerator {

  private const string CLASS_NO_STATE = 'lms_classes_class_number';

Steps to reproduce

  • Install LMS 1.1.3 on Drupal 10.5.4.
  • Enable the lms_classes module.

Proposed resolution

Set the minimum PHP requirement to 8.3 in composer.json or remove code that is not compatible with PHP 8.1 (to match Drupal core supported PHP versions).

Also, consider adding version constraints for Drupal itself in composer.json

Remaining tasks

Decide on which approach to follow.

📌 Task
Status

Active

Version

1.1

Component

Other backend

Created by

🇳🇮Nicaragua dinarcon

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

Merge Requests

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