Skip to content
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

Merged
merged 3 commits into from
Jan 9, 2023

Conversation

anomiex
Copy link
Contributor

@anomiex anomiex commented Jan 5, 2023

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's WP_Filesystem class, instead of mixing it with direct filesystem access.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

pdWQjU-bv-p2

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Is CI happy?
  • Check that functionality provided by those Helper_Script_Manager classes still works.

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.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run bin/jetpack-downloader test jetpack update/wpcs-pre-phpcbf-3 to get started. More details: p9dueE-5Nn-p2

…ager.php

Co-authored-by: Steve D. <33553323+sdixon194@users.noreply.github.com>
@sdixon194 sdixon194 added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jan 9, 2023
@anomiex anomiex merged commit d96f8b7 into trunk Jan 9, 2023
@anomiex anomiex deleted the update/wpcs-pre-phpcbf-3 branch January 9, 2023 16:54
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 9, 2023
n3f pushed a commit that referenced this pull request Jan 11, 2023
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants