ComposerPluginsValidator uses Composer's internal Package class

Created on 14 March 2023, almost 2 years ago

Problem/Motivation

ComposerPluginsValidator has a normalizePackageName() method which uses the \Composer\Package\Package class to normalize a package name.

That's no bueno, because we've removed our dependency on composer/composer and cannot rely on that class anymore. Tests don't catch this because composer/composer is a dev dependency of Drupal core, and therefore the class is available.

Proposed resolution

The Package class doesn't do any special normalization on the package name apart from calling strtolower() on it. There's no reason, therefore, for us to use Package to normalize a package name. We can just call strtolower ourselves.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Package Manager

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Comments & Activities

Production build 0.71.5 2024