On 07/07/2025 20:55, Theodore Brown wrote:
> On Fri, July 4, 2025 at 01:01 Niels Dossche wrote:
> 
>> There are a few things I will vote no for:
>>
>> * Deprecate semicolon after case in switch statement.
>>   People seem to use this and it doesn't seem harmful to have. Just because 
>> you don't like it doesn't mean we should yeet it.
> 
> Can you point to a project in current use where this syntax is intentionally 
> used? I searched quite extensively
> (even well beyond the top 1000 Composer packages where there are zero usages) 
> and only found a tiny number of
> accidental usages (e.g. where all the cases in a switch statement had a 
> normal colon except one which had a semicolon typo).
> Almost all of these were quickly fixed by sending a pull request.

See https://externals.io/message/126000, in particular Derick's reply.
Also I'm sure there's a lot of brownfield PHP code that we have no idea about 
how it looks like.
> Maybe the unnecessary legacy syntax doesn't seem harmful, but I disagree. 
> Non-standard alternate syntax can cause confusion
> about a potential behavioral difference, and sometimes can even hold back 
> future features (for example, deprecating the curly
> brace array access syntax in PHP 7.4 made it possible to implement property 
> hooks in PHP 8.4).
Sure, but whether it opens up anything useful in the future is highly 
speculative.

> I updated the RFC to document the planned deprecation message, as well a 
> command which automatically fixes any usages in a project.

:+1:

Kind regards
Niels

Reply via email to