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

WAF: Extract definition of constants from Waf_Runner to Waf_Constants #28104

Merged
merged 4 commits into from
Jan 18, 2023

Conversation

nateweller
Copy link
Contributor

@nateweller nateweller commented Dec 28, 2022

Changes proposed in this Pull Request:

  • Moves define_mode() and define_share_data() from Waf_Runner to Waf_Constants.
  • Renames Waf_Constants::define_constants() to Waf_Constants::define_bootstrap_constants(), and extracts the three constants that it defines into three distinct methods: define_waf_directory(), define_wpconfig_path(), and define_killswitch().

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

peb6dq-mP-p2

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

No

Testing instructions:

  • Proof read changes
  • Ensure tests pass
  • Check for regression in package functionality

@github-actions
Copy link
Contributor

github-actions bot commented Dec 28, 2022

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 28, 2022

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.

Base automatically changed from add/waf-rules-class to add/protect-waf-phase-2 January 12, 2023 00:01
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Test Review E2E Tests [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations labels Jan 12, 2023
@nateweller nateweller changed the title WAF: Extracts constants and defines from Waf_Runner to Waf_Constants WAF: Extract definition of constants from Waf_Runner to Waf_Constants Jan 16, 2023
@nateweller nateweller removed [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations E2E Tests [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Test Review labels Jan 16, 2023
@nateweller nateweller added this to the protect/1.2.1 milestone Jan 16, 2023
@karovski karovski self-requested a review January 18, 2023 21:45
Copy link

@karovski karovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through the changes, tests pass OK, and did a UI pass. LGTM!

@nateweller nateweller merged commit 09e7b6f into add/protect-waf-phase-2 Jan 18, 2023
@nateweller nateweller deleted the update/waf-constants branch January 18, 2023 22:26
@nateweller nateweller mentioned this pull request Jan 18, 2023
2 tasks
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.

None yet

2 participants