Upgrade Status not reporting use of deprecated libraries when they are included in a theme's .info.yml file

Created on 9 February 2024, 11 months ago
Updated 12 February 2024, 10 months ago

Problem/Motivation

If a theme includes deprecated libraries by specifying them with a libraries key in its mytheme.info.yml file, those libraries are not checked to see if they were deprecated. For example, if a theme's .info.yml file included this:

libraries:
  - mytheme/global-styling
  - mytheme/global-js
  - core/jquery
  - core/jquery.once

Upgrade Status does not report that core/jquery.once is deprecated.

In the past (mid-2023?), it seems like Upgrade Status did handle this correctly. We did multiple upgrades of sites with jquery.once added this way, and I thought that it flagged the deprecation each time. Did something change in how Upgrade Status checks dependencies? Or, am I imagining things???? That's quite possible, although multiple people here remember seeing the same thing!

Steps to reproduce

  1. Add "core/jquery.once" to the list of libraries in a theme .info.yml file.
  2. Scan the updated theme.
  3. See that Upgrade Status does not report a problem.

It should report something like this:

The 'mytheme' theme is depending on a deprecated library. The core/jquery.once asset library is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256 โ†’

Proposed resolution

Upgrade Status should report that deprecated libraries are dependencies regardless of how they are specified.

Remaining tasks

  1. Make Upgrade Status check dependencies added via a .info.yml file.
  2. Add tests?
  3. Commit
๐Ÿ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States jrb Raleigh-Durham Area, NC, USA

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

Comments & Activities

Production build 0.71.5 2024