WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 11 days ago

#53359 new task (blessed)

Coding Standards fixes for WP 5.9

Reported by: desrosj Owned by:
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

Previously:

Change History (28)

@kapilpaul
6 weeks ago

Patch for PHPCS fixing in bundled themes.

#1 @kapilpaul
6 weeks ago

In 53359.diff mostly fixed the strict comparison. here is the GitHub PR

#2 @SergeyBiryukov
5 weeks ago

In 51285:

Coding Standards: Remove redundant type casting to array in WP_Query::get_posts().

This brings some consistency with other instances of using get_post_stati() in core.

get_post_stati() always returns an array, so the type casting is not needed.

Follow-up to [13172].

See #53359.

#3 @SergeyBiryukov
3 weeks ago

In 51381:

Coding Standards: Remove wrapping HTML tags from translatable strings.

This fixes a "Strings should not be wrapped in HTML" WPCS warning in help tabs for Export Personal Data and Erase Personal Data screens.

Follow-up to [50147].

See #53359.

#4 @SergeyBiryukov
3 weeks ago

In 51399:

Coding Standards: Rename the $ID variable to $user_id in wp_insert_user() and wp_update_user().

This fixes a "Variable $ID is not in valid snake_case format" WPCS warning.

Follow-up to [2872].

See #53359.

#5 @SergeyBiryukov
3 weeks ago

In 51400:

Bundled Themes: Correct comment formatting in inc/block-patterns.php.

Follow-up to [51045], [51103].

Props kapilpaul.
See #53359, #52627.

#6 @SergeyBiryukov
3 weeks ago

In 51401:

Twenty Fifteen: Use strict comparison in inc/custom-header.php.

Props kapilpaul.
See #53359.

#7 @desrosj
3 weeks ago

In 51406:

Bundled Themes: Correct comment formatting in inc/block-patterns.php.

Follow-up to [51045], [51103].

Props kapilpaul, SergeyBiryukov.
See #53359, #52627.

This ticket was mentioned in PR #1509 on WordPress/wordpress-develop by jrfnl.


12 days ago

  • Keywords has-patch has-unit-tests added

#9 @jrf
12 days ago

I've just uploaded 9 CS related patches to fix some low hanging fruit. To verify, one PR containing all these patches has been opened on GH and the build is passing: https://github.com/WordPress/wordpress-develop/pull/1509

#10 @prbot
12 days ago

hellofromtonya commented on PR #1509:

@jrfnl Is this PR complete and ready for code review?

#11 @prbot
12 days ago

jrfnl commented on PR #1509:

@hellofromtonya There will always be more fixes to make, but the fixes as pulled here are ready for commit as far as I'm concerned.

#12 @jrf
12 days ago

Added three more patches related to the ignore annotation review done for #53477. As the changes in ignore annotations are not related to the PHPCS update in #53477, I'm adding the patches here.

This ticket was mentioned in PR #1510 on WordPress/wordpress-develop by jrfnl.


12 days ago

Update the PHP_CodeSniffer dependency from version 3.5.5 to version 3.6.0.

I have also verified the ignore annotations, but no changes are needed there which are directly related to the PHPCS update. Changes which could be made have been added to #53359.

Trac ticket: https://core.trac.wordpress.org/ticket/53477

#14 @hellofromTonya
12 days ago

  • Keywords commit added

Marking submitted patches from [https://github.com/WordPress/wordpress-develop/pull/1509 PR 1509) ready for commit.

#15 @prbot
11 days ago

jrfnl commented on PR #1510:

Closing as merged via changeset https://core.trac.wordpress.org/changeset/51470

Note: See TracTickets for help on using tickets.