- Issue created by @mstrelan
- 🇦🇺Australia acbramleyBig +1, surprised this isn't already a thing! 
- 🇦🇹Austria drunken monkey Vienna, AustriaWould be +1, but still requires the actually proposed changes, of course. 
- 🇦🇺Australia mstrelanHonestly I don't know what to propose, it's essentially "turn on SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperatorand let phpcs enforce it". Happy for others to come up with the wording for the coding standards.
- Status changed to Needs workover 1 year ago 3:42am 29 February 2024
- 🇦🇺Australia mstrelanAdded acbramley and alexskrypnyk as supporters (confirmed in slack) 
- 🇦🇹Austria drunken monkey Vienna, AustriaThanks for proposing the text, looks good! 
 Added myself as a supporter.
- 🇳🇱Netherlands bbrala NetherlandsNext step should be the change record it seems, after that it can be discussed in the next meeting. 
- Status changed to Needs reviewover 1 year ago 8:03pm 8 May 2024
- 🇳🇱Netherlands bbrala NetherlandsAdded a change record to keep it moving :) [#3446111] 
- 🇳🇿New Zealand quietoneSetting to RTBC so it gets reviewed by the committee. 
- Status changed to RTBCover 1 year ago 12:50am 19 July 2024
- 🇦🇺Australia mstrelanUpdating status on behalf of @quietone as per #13. 
- 🇳🇿New Zealand quietoneCan someone check if there are any sniffs to enforce this change? 
- 🇦🇺Australia mstrelan@quietone the sniff is already implemented in 📌 Require short ternary (Elvis operator) syntax Postponed 
- 🇳🇿New Zealand quietoneThis was announced in blog post → published 9 Oct. 
- 🇳🇿New Zealand quietoneThere has been no feedback from the blog post. 
- 🇦🇺Australia dpi Perth, AustraliaIm now a -1 on this issue, copying my comment from the core issue: I've been making use of phpstan strict ruleset for a couple years now, and I have to mention that I agree with one of their rules, that would be at odds with this issue. That is, to never use ?:. Because it has weak comparison semantics.Justification, from docs: Disallow short ternary operator (?:) - implies weak comparison, it's recommended to use null coalesce operator (??) or ternary operator with strict condition. So, since this issue is about core itself, not coding standards. I'd support enabling this rule from strict, and/or in the interim finding a codesniffer rule that disallows it. So I'd be advocating for SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator 
- 🇦🇺Australia mstrelanThe proposed text talks about a specific scenario which is already a non-strict comparison. So disallowing the short ternary syntax does not improve this. It may encourage people to learn more as to why it's disallowed, and refactoring to use a strict comparison, but in most cases people would probably just expand it out to the longer syntax. 
- 🇳🇿New Zealand quietoneI've updated the documentation and published the change record. 
- 🇧🇪Belgium borisson_ Mechelen, 🇧🇪Reviewed the documentation page, that still had visibile html tags, fixed those. I think this is done now. 
- 🇳🇿New Zealand quietone@dpi, I think it best to discuss using SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator in a meeting or a separate issue. Updating credit. I've included myself as well. 
- Automatically closed - issue fixed for 2 weeks with no activity.