- Issue created by @smustgrave
- Status changed to Postponed
10 months ago 10:33pm 26 March 2024 - π¦πΊAustralia mstrelan
Confused about what exactly was the problem. #2827055-141: Add option to show only start or end date in the DateTime Range custom formatter β points to https://stitcher.io/blog/new-in-php-82#fetch-properties-of-enums-in-cons... but that is about fetching enum properties in const expressions, which I couldn't find any instances of in the revert commit.
Regardless, I think this issue needs more information about what we're trying to do here. Something like "Convert DateTimeRangeConstants interface to DateTimeRangeDisplayOptions enum".
Guess it's also postponed until β¨ Add option to show only start or end date in the DateTime Range custom formatter Needs review is back in.
- Assigned to mrshowerman
- Status changed to Active
10 months ago 8:29pm 3 April 2024 - π©πͺGermany mrshowerman Munich
β¨ Add option to show only start or end date in the DateTime Range custom formatter Needs review is in.
- Merge request !7310Convert DateTimeRangeConstantsInterface to enum β (Open) created by mrshowerman
- Issue was unassigned.
- Status changed to Needs review
10 months ago 9:39pm 3 April 2024 - Status changed to Needs work
10 months ago 10:37pm 3 April 2024 - π¦πΊAustralia mstrelan
I think we need to deprecate the consts and keep them around. Also seems we are likely to move to UpperCamelCase for enums as per #3339746: Decide on a coding style for PHP Enumerations β .
- Status changed to Needs review
10 months ago 6:56am 4 April 2024 - π©πͺGermany mrshowerman Munich
Thanks for pointing that out, @mstrelan.
I added back the interface and marked it for removal in 11.1, but this is of course to be discussed.
Change the enum cases to UpperCamelCase.Guess we now need a follow up for the removal, and also a change record.
- Status changed to Needs work
10 months ago 2:24pm 6 April 2024 - π·πΊRussia Chi
Why are the cases coded in camel case? They are like constants. Shouldn't we use uppercase for them?
- π¦πΊAustralia mstrelan
@chi see #9 and the issue linked there for discussion on casing
- π©πͺGermany mrshowerman Munich
Rebased the MR and created a CR draft.
Also updated the deprecation target to 11.2.0 and the removal target to 12.0.0.
Please review.Not sure if we need a followup for the removal of the deprecated interface.
- πΊπΈUnited States smustgrave
We actually don't need a follow up just yet. When we get close to D12 there will be dozens of tickets scoped by components or group of components, modules, etc.
Did a search for
DateTimeRangeConstantsInterface::BOTH
DateTimeRangeConstantsInterface::START_DATE
DateTimeRangeConstantsInterface::END_DATEAnd everything seems to be replaced correctly.
Don't see any open threads so believe this one is good.
- π³πΏNew Zealand quietone
This is straightforward. I made two comment changes, one to correct the link in the deprecation message to link to the change record and not the issue, the other was to a comment. I double checked that this link is correct.
When something is deprecated it is typically stated in the title of the change record so I have changed the title. I also added the branch and version which were not filled in yet. The CR stated that "
DateTimeRangeFormatter
now uses an enum" but there is not a file or class of that name in core. I've changed that to the Interface. And I I look back at the comments I see that the change record was not reviewed. :-(Leaving at RTBC and updating credit.