- Issue created by @mfb
- Merge request !7779Issue #3443818: Specify $options array shape for OutboundPathProcessorInterface β (Open) created by mfb
- Status changed to Needs review
about 1 year ago 6:20pm 26 April 2024 - πΊπΈUnited States smustgrave
So this seems to make it harder to read. Is it worth that hit?
- πΊπΈUnited States mfb San Francisco
@smustgrave well, as I mentioned in remaining tasks, the $options might in fact be designed to be open-ended? In which case this could just be documented as
mixed[]
. (If so, should be needs work for that) - πΊπΈUnited States smustgrave
Lets do that, adding mixed[] and maybe a comment about how this open-ended?
- Status changed to Needs work
12 months ago 2:33am 11 May 2024 - πΊπΈUnited States smustgrave
@mfb you can address it as the reported but tagging as novice in case a new user from portland is around.
- πΊπΈUnited States mfb San Francisco
maybe a comment about how this open-ended
Can you/someone confirm that options are intended to be open-ended (e.g. for contrib module to add/use arbitrary options)? If so, yes, that would be good to document
- Status changed to Needs review
7 months ago 10:17am 27 September 2024 - πͺπΈSpain rodrigoaguilera Barcelona
I feel that array is not supposed to be extended. At least I am not aware of any module that does it.
I think the current approach in the MR is right. Leaving it for others to review
- πΊπΈUnited States mfb San Francisco
@rodrigoaguilera thanks for looking into it! Did you notice that core itself uses some additional undocumented option keys? See the remaining tasks section of the issue summary.
- πͺπΈSpain rodrigoaguilera Barcelona
Oh, thanks for pointing that out. Then yes, they are probably a bucket for any arbitrary property.
The task of figuring out what was the original intention I think it might be difficult so I don't think is novice anymore.
The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. 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.
- πΊπΈUnited States smustgrave
So I still kinda maintain this looks ugly and kind already mentioned in the comments. If we ever get around to adding typehints will we have to use this long string now?
- πΊπΈUnited States mfb San Francisco
@smustgrave I tried to make it a multiline array shape definition, which works fine with phpstan, but apparently Drupal\Sniffs\Commenting\FunctionCommentSniff (part of the drupal/coder project) cannot parse such phpdoc properly, see π Array shapes in multiple lines are not supported. Active , so I guess we should postpone this