[pp-1] Review requirements duplication

Created on 24 April 2025, about 12 hours ago

Problem/Motivation

As part of πŸ“Œ Convert hook_requirements that do interact with install time that are not system Active some minor duplication was introduced for install time requirements, explore what can be injected here and reduce duplication if possible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component

postgresql db driver

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

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

Comments & Activities

  • Issue created by @nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States dww

    Copying some relevant comments from the MR threads...

    dww

    Looking more closely, this whole method (in core/modules/pgsql/src/Hook/PgsqlRequirementsHooks.php) is identical to core/modules/pgsql/src/Requirements/PgsqlRequirements.php. Any harm in this runtime/update Hook instantiating the special install-time class to re-use the code instead of maintaining 2 distinct copies of this?

    nicxvan

    The line of what can be injected is different for install phase. So it feels safer to keep it separate, there is a small amount of duplication, but I can create follow ups to explore, this issue is more about just removing the hook_requirements.

    dww

    I know what's permitted to inject is different, which is why we have the whole separate class mechanism for install time. However, if the Install object is safe at install time, with less code loaded, surely it would work to use it at runtime with everything loaded

Production build 0.71.5 2024