Closed (fixed)
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2026 at 16:51 UTC
Updated:
12 Jun 2026 at 10:30 UTC
Jump to comment: Most recent
Comments
Comment #2
mondrakeComment #4
mondrakeComment #5
mondrakeComment #6
dcam commentedI'm seeing a lot of potential for using
@phpstan-typeto reduce repetition within and across classes. Is there a reason you decided to not use it in this MR? If it's to keep the changes simple I just want to say that I'm personally OK with doing it here.Comment #7
mondrakeI do as well, but every time I try to use it in an issue there's debate, and fact is that ATM there's not even one instance in core. See #3565560: Describe the requirements array as a PHPDoc type for instance, or #3532930: Make Drupal\Core\Database\Database type strict and PHPStan L10 compliant.
In this particular issue, frankly did not think about that. But it should be a separate issue from this, I guess.
Comment #8
smustgrave commented@dcam any objections to a follow up?
Comment #9
dcam commentedNo objection. I don't disagree with the point made in #7. I wish it weren't the case, but there's no reason to hold this up over it.
I'm certain that I reviewed all of the changes a couple of weeks ago and didn't find any problems. But I checked them all again today. Fortunately, they're mostly pretty easy to validate. The majority of the changes come directly from PHPStan templates in the referenced classes. Thus, comparison is pretty simple. I didn't find any problems. This looks good to me.
Comment #11
longwaveCommitted and pushed to main, thanks! Doesn't backport cleanly to 11.x due to baseline conflicts, not sure this is worth the effort - reopen if you disagree.