#58831 closed task (blessed) (fixed)
Coding Standards fixes for WP 6.4
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 6.4 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch has-unit-tests |
| Focuses: | coding-standards | Cc: |
Attachments (23)
Change History (98)
#2
@
3 years ago
Thanks! These patches all look good to me.
Do you plan to commit them? If so, I think they're all good to ship, now that 6.3 has been branched.
#3
@
3 years ago
Do you plan to commit them?
I'm neck-deep in WPCS at the moment. I've asked @SergeyBiryukov if he'd be so kind as to commit these.
#4
in reply to:
↑ 1
;
follow-up:
↓ 5
@
3 years ago
Replying to jrf:
I've just uploaded 8 pretty small patches.
Thank you!
As previously noted in comment:1:ticket:50085, the change to __DIR__ in wp-tests-config-sample.php was previously reverted in [47201] to avoid breaking unit tests created with the wp scaffold plugin WP-CLI command, see comment:15:ticket:48082 and #49377 for details. It might be worth checking if that concern is still relevant.
Other patches look good to me at a glance :)
#5
in reply to:
↑ 4
@
3 years ago
Replying to SergeyBiryukov:
As previously noted in comment:1:ticket:50085, the change to
__DIR__inwp-tests-config-sample.phpwas previously reverted in [47201] to avoid breaking unit tests created with thewp scaffold pluginWP-CLI command, see comment:15:ticket:48082 and #49377 for details. It might be worth checking if that concern is still relevant.
Ah, that's good to know. We may need to put an exception in place for that file once WPCS 3.0.0 comes out (which will flag this).
Having read up on the discussion, I don't think this concern will ever really go away completely, as, even though the WP-CLI scaffold plugin script has been updated, the problem is not the script itself, but the fact that there are countless plugins using a copy of that script and getting all those copies updated to the latest version is a manual process (and in the mean time CI workflows would break).
#12
follow-up:
↓ 13
@
3 years ago
@SergeyBiryukov thanks for the update - do you plan on creating the required backport to Gutenberg for your change to the Tag Processor?
This ticket was mentioned in PR #3873 on WordPress/wordpress-develop by @SergeyBiryukov.
3 years ago
#14
- Keywords has-patch has-unit-tests added
This ticket was mentioned in PR #4922 on WordPress/wordpress-develop by @SergeyBiryukov.
3 years ago
#15
Trac ticket: https://core.trac.wordpress.org/ticket/58831
This ticket was mentioned in PR #5042 on WordPress/wordpress-develop by @jrf.
2 years ago
#33
### PHPCS: improve organisation of the PHPCompatibility ruleset
No functional changes.
This commit:
- Adds section headers to the ruleset file.
- Organizes all directives in their respective sections.
### PHPCS: remove unnecessary directives in PHPCompatibility ruleset
This commit:
- Removes the unnecessary exclusion patterns for the
node_modulesand thevendordirectory.
As this ruleset only scans the
srcdirectory, those directories would never be scanned anyway.
- Removes the selective excludes related to the Random Compat package.
This package was removed in WP 6.3, so these excludes are no longer necessary.
---
Trac ticket: https://core.trac.wordpress.org/ticket/58831
@
2 years ago
I have checked above mentioned issue and founds another file. Here, I have added its patch.
#49
in reply to:
↑ 48
;
follow-up:
↓ 50
@
2 years ago
Replying to jrf:
Re commit [56586] - FYI: the proposed change in ticket #59232 should also help in making it clearer for the future that the signatures of those methods need to stay in sync with the signature of the parent method.
Thanks! I have a draft PR there as well as part of coding sessions with @poena, @andrea, and @aristath :)
#50
in reply to:
↑ 49
@
2 years ago
Replying to SergeyBiryukov:
Thanks! I have a draft PR there as well as part of coding sessions with @poena, @andrea, and @aristath :)
Awesome!
#56
@
2 years ago
Anything I can do to move GH PR #5042 forward ?
@SergeyBiryukov commented on PR #5042:
2 years ago
#59
#67
follow-up:
↓ 68
@
2 years ago
There is a false !== strpos in wp_render_layout_support_flag. This could use str_contains
#68
in reply to:
↑ 67
@
2 years ago
Replying to spacedmonkey:
There is a
false !== strposinwp_render_layout_support_flag. This could usestr_contains
#59622 covers this line in its patch, so there should be no need to separately address it here.
#70
@
2 years ago
The RC1 release party is about to start. Closing this as fixed. Thank you everyone for your contributions :)
#72
@
2 years ago
This ticket is closed, any new patches and PR should be directed to the current issue for 6.5: #59650. Thanks!
@SergeyBiryukov commented on PR #3873:
17 months ago
#74
This will need tests before it can be merged:
Indeed, this is basically still a draft where I cherry-pick certain changes after a closer review, making sure they are covered by new or existing tests. I will investigate anything related to wp_parse_args() and WP_Query, thanks!
I've just uploaded 8 pretty small patches.
About half are for things which are checked by WPCS, but flagged as a
warning(which doesn't fail the build) and which have slipped into the codebase unnoticed.The other half are things which are not (yet) checked by WPCS, but are rules/best practices which have been fixed up before, for which new issues have slipped into the codebase.