realpath() cannot take NULL but NULL expected for metapackages

Created on 6 June 2023, over 1 year ago

Problem/Motivation

In ComposerInspector.php in getInstalledPackagesList(), if drupal/core-dev is installed (metapackage), then the validator fails, even though it shouldn't.

Steps to reproduce

Try to load Project Browser 1.0.x-dev using the 3.0.x-dev of Automatic Updates with Package Manager enabled.

Proposed resolution

According to PHP docs for realpath: "Whilst a path must be supplied, the value can be an empty string. In this case, the value is interpreted as the current directory."

The code below the offending line implies that we should allow the current directory to be valid, but only for metapackages.

πŸ› Bug report
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

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

Comments & Activities

Production build 0.71.5 2024