Specify $project array shape for UpdateFetcherInterface and UpdateManagerInterface

Created on 19 January 2025, 3 months ago

Problem/Motivation

Modules implementing UpdateFetcherInterface will trigger a phpstan warning "has parameter $project with no value type specified in iterable type array. "

Steps to reproduce

Run phpstan analyze at level 6 or higher, on a module implementing UpdateFetcherInterface.

Proposed resolution

Specify the array shape of $project in UpdateFetcherInterface. We can also specify the return shape of UpdateManagerInterface::getProjects() as it is defined as the reference array type.

Remaining tasks

User interface changes

None

API changes

No API change, this just adds a more specific type definition to the phpdoc based on existing documentation.

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

update.module

Created by

πŸ‡ΊπŸ‡ΈUnited States cmlara

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

Comments & Activities

Production build 0.71.5 2024