Incompatibility with PHP 8.1: Standalone null type used in ModuleActivator.php

Created on 27 February 2025, about 1 month ago

Problem/Motivation

While working on Issue #3506513, I created a branch from 2.0.x and enabled the Project Browser module. Upon activation, I encountered the following fatal error:
Fatal error: Null cannot be used as a standalone type in /app/web/modules/custom/project_browser-3506513/src/Activator/ModuleActivator.php on line 58.

Steps to reproduce

  1. Use PHP 8.1 or earlier.
  2. Create a branch from 2.0.x of the Project Browser module.
  3. Enable the module.

Steps to reproduce

The module should activate without errors.

Steps to reproduce

A fatal error occurs due to the use of null as a standalone type.

Proposed resolution

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India lavanyatalwar

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