- π«π·France andypost
Deprecation of colon is commited to PHP 8.5
https://github.com/php/php-src/commit/5f8d648af6ef4e29a3c7f2b2029d08466c...
Updated IS
- π«π·France andypost
Code was fixed in π Inconsistent switch case syntax Downport
but sniffer is not enabled https://github.com/PHPCSStandards/PHPCSExtra/commit/6f023adc8e28dbdcd21a...
- π«π·France andypost
- Merge request !12964Issue #2901831 by: Only use colons in case statements β (Closed) created by andypost
- π«π·France andypost
ready for review/commit
EDIT failed sniff https://git.drupalcode.org/issue/drupal-2901831/-/jobs/6176971
- πΊπΈUnited States smustgrave
Seems straight enough. Not sure if the word should be a cspell ignore in the phpcs file but donβt feel too strong about that
- π«π·France andypost
cspell fix is required, see the job
Moreover PHP 8,5 beta1 CI image created and test run showing serious log pollution https://git.drupalcode.org/issue/drupal-3523596/-/jobs/6189639
- π¬π§United Kingdom alexpott πͺπΊπ
Let's not add this to the dictionary - it is not a word.
We can added it to the phpcs.xml.dist file like so:
<?xml version="1.0" encoding="UTF-8"?> <!-- cspell:ignore Openercase --> <ruleset name="drupal_core">
- π«π·France andypost
Thank you, never know it could work like that)
this approach much cleaner!
- π§πͺBelgium borisson_ Mechelen, π§πͺ
Back to rtbc, this is indeed a better solution.
- π¬π§United Kingdom alexpott πͺπΊπ
Can we move it to the top of the file... because this can become a list of all the non-words in the file. It's easier to maintain I think.
- π¬π§United Kingdom alexpott πͺπΊπ
For me it bleongs belong the xml - it's got nought to do with the running of the file... and having it there would be inline with having it after the namespace like we do with PHP.
The aim is to have it easy to spot and easy to ignore.
- π«π·France andypost
looks like all php-files are inserting it before namespace but a lot of others doing it after `use` so probably makes sense to formalize it)
- π¬π§United Kingdom alexpott πͺπΊπ
Looks great now. I dunno about formalising things - like this is the first XML fill we've added this to I think.
- π¬π§United Kingdom alexpott πͺπΊπ
Given PHP has deprecated this it is no longer an issue for our coding standards committee (they have no choice here anymore) so merging this to 11.x to stop any new cases getting back in to core.
We need to open an issue to backport π Inconsistent switch case syntax Downport to 10.6.x / 10.5.x so that branch can get PHP 8.5 testing and compatibility.
Committed ef77219 and pushed to 11.x. Thanks!
-
alexpott β
committed ef772191 on 11.x
Issue #2901831 by andypost, krzysztof domaΕski, roderik, alexpott: Only...
-
alexpott β
committed ef772191 on 11.x
- π«π·France andypost
Filed follow-up for 10.x backport π 10.x backport - Inconsistent switch case syntax Active