forked from Automattic/jetpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPCS: Clean up some WordPress.WP.AlternativeFunctions sniffs (Automa…
…ttic#28198) In packages/autoloader we can just ignore the sniff entirely. None of the code there runs inside WordPress, so we don't need to use WordPress's alternative functions. The same goes for the tests in packages/my-jetpack. The `Helper_Script_Manager` classes in packages/backup and packages/transport-helper, on the other hand, can make more consistent use of WordPress's `WP_Filesystem` class, instead of mixing it with direct filesystem access.
- Loading branch information
Showing
17 changed files
with
185 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
|
||
<!-- This doesn't run inside of WordPress, do we don't need to use WordPress's alternative functions. --> | ||
<rule ref="WordPress.WP.AlternativeFunctions"> | ||
<severity>0</severity> | ||
</rule> | ||
|
||
</ruleset> |
5 changes: 5 additions & 0 deletions
5
projects/packages/autoloader/changelog/update-wpcs-pre-phpcbf-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Globally ignore WordPress.WP.AlternativeFunctions sniff, no code here runs inside of WordPress so we'll never want those functions. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Use `WP_Filesystem` more consistently in `Helper_Script_Manager`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
projects/packages/my-jetpack/changelog/update-wpcs-pre-phpcbf-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: fixed | ||
Comment: Ignore WordPress.WP.AlternativeFunctions sniff in tests. No need to use WordPress's filesystem functions there. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
|
||
<!-- We don't need to use WordPress's filesystem functions to set up tests. --> | ||
<rule ref="WordPress.WP.AlternativeFunctions"> | ||
<severity>0</severity> | ||
</rule> | ||
|
||
</ruleset> |
4 changes: 4 additions & 0 deletions
4
projects/packages/transport-helper/changelog/update-wpcs-pre-phpcbf-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Use `WP_Filesystem` more consistently in `Helper_Script_Manager`. |
Oops, something went wrong.