Needs work
Project:
Drupal core
Version:
main
Component:
install system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2026 at 18:17 UTC
Updated:
28 Apr 2026 at 16:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
mondrakeComment #4
mfbI think that's not the correct interface to use? I get
t('') instanceof \Drupal\Core\Entity\TranslatableInterface === FALSEMaybe just
string|\Stringableis fine, not my area of expertise though.I guess you're implying that all the keys are optional? Which isn't what the existing docs say, but I've not tested it out.
Comment #5
mfbSome more type questions:
It looks to me like value and description are permitted to be render arrays, not just Stringable? (when testing this out in a legacy requirements hook)
I think value could also reasonably be a numeric type? In case someone wants to print a number without units.
Comment #6
mstrelan commentedIf only we had made this a value object in #3490843: Create class to replace hook_requirements('install') we wouldn't need this. Maybe we still can, but that doesn't block this issue.
Comment #7
mondrakeThanks for review.
It seems that "title" can be avoided during installation. But probably not during update/runtime, so in order not to have two different types for install vs runtime I think better keep it optional. The "weight" key seems no longer used, but I see it appearing.
yes, done
not what the api file says... tried here to align definitions between the API file and the interface.
FWIW I think MR!14215 is how this should be represented, but coding standards and probably the API module are not there. Shrug...
Comment #9
mondrakeComment #10
dcam commentedNeeds work for a rebase.
Should we note above the
RequirementInfodefinition inInstallRequirementsInterfaceandmodule.api.phpthat the key is no longer used and is included for legacy purposes? Otherwise there's no information on why it's included in the array shape, but not in the docs. I had to come back here to find out why while reviewing.Related, but not in-scope: is
hook_requirements()inmodule.api.phpsupposed to have a deprecation annotation?I'm adding a related issue where some of these same issues were brought up.
Comment #11
mondrakeRebased.
Sure. Done.
Thanks!
Comment #12
dcam commentedCool. That's all I could find to comment on. It looks good to me.
Comment #14
mondrakePersonally, I do not find it easier to read... especially if we get to finalise #3360160: Stop using FQCN in PHPDoc annotations. Not going to argue though.
Comment #15
longwaveI suppose we really need an issue either in Coder or PHPCS to handle
@phpstan-typebetter?Comment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. The merge request has merge conflicts and cannot be merged. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
mondrakeRebased. If #3360160: Stop using FQCN in PHPDoc annotations were in, this could be simplified to
way more readable IMHO.
Comment #18
mondrake.
Comment #19
alexpottWhy are we adding weight back. Let's not let's remove it and then PHPStan will tell people to remove it which is great.
FYI the workspace requirement in this change could be removed that's not been relevant since Drupal 8 :).