cedaro / satispress

Expose installed WordPress plugins and themes as Composer packages.
500 stars 48 forks source link

Update WPCS from ^1 to ^2.3.0 #200

Open GaryJones opened 1 year ago

GaryJones commented 1 year ago

While WPCS 3.0.0 is getting closer to release, this package still uses WPCS ^1.

Bumping the version and running composer phpcs --report=source gives:

PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
    SOURCE                                                       COUNT
----------------------------------------------------------------------
[x] Generic.Arrays.DisallowShortArraySyntax.Found                316
[ ] WordPress.PHP.DisallowShortTernary.Found                     6
[ ] WordPress.Security.NonceVerification.Recommended             4
[x] WordPress.Arrays.CommaAfterArrayItem.NoComma                 1
[ ] WordPress.CodeAnalysis.EscapedNotTranslated.Found            1
[ ] WordPress.PHP.IniSet.Risky                                   1
----------------------------------------------------------------------
A TOTAL OF 329 SNIFF VIOLATIONS WERE FOUND IN 6 SOURCES
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SOURCES AUTOMATICALLY (317 VIOLATIONS IN TOTAL)
----------------------------------------------------------------------

@bradyvercher Do you have a preference for either having the short array syntax fixed with phpcbf, or to add an exclusion for it in .phpcs.xml.dist?