-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPCS: Clean up some WordPress.WP.AlternativeFunctions sniffs #28198
Conversation
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.
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. |
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run |
projects/packages/transport-helper/src/class-helper-script-manager.php
Outdated
Show resolved
Hide resolved
…ager.php Co-authored-by: Steve D. <33553323+sdixon194@users.noreply.github.com>
… sniffs (#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.
Changes proposed in this Pull Request:
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'sWP_Filesystem
class, instead of mixing it with direct filesystem access.Other information:
Jetpack product discussion
pdWQjU-bv-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Helper_Script_Manager
classes still works.