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

Backup: Add namespace versioning to Helper_Script_Manager and other classes #34739

Merged
merged 18 commits into from
Jan 4, 2024

Conversation

pypt
Copy link
Contributor

@pypt pypt commented Dec 20, 2023

Add class versioning using PHP namespaces, to make sure that the plugin always loads the expected version of a class.

Proposed changes:

When two or more plugins are installed that contain a class with the same name (e.g. the main Jetpack plugin and the Jetpack VaultPress Backup plugin both ship Automattic\Jetpack\Backup\Helper_Script_Manager class), the Jetpack autoloader #34297 (comment), and under certain circumstances it might even decide to load an older version of the class.

Specifically, we had issues with the Jetpack VaultPress Backup plugin loading an older version of the Helper_Script_Manager class using the newer code, in which case an abspath property in Helper_Script_Manager::install_helper_script() (#34297) wasn't always returned.

  • p1703028095475669-slack-CS8UYNPEE

To avoid that behavior, and always load the exact same version of the class that has been shipped with the plugin, we're adding simple namespace-based versioning to Helper_Script_Manager, backup plugin, and other related code.

All of the classes that make up the package/plugin got moved to either the Automattic\Jetpack\Backup\V0001 or the Automattic\Jetpack\Transport_Helper\V0001 namespace. Code that uses said classes refer to them using the versioned namespace (e.g. Automattic\Jetpack\Backup\V0001\Helper_Script_Manager::install_helper_script(), so that once the plugin gets installed, it always loads and uses a specific version of its dependencies (and not an older/newer one, which it might be incompatible with).

Older versions of the Jetpack plugins don't use these namespaces (e.g. they refer to the Helper_Script_Manager class as Automattic\Jetpack\Backup\Helper_Script_Manager), so if the plugin with versioned namespaces gets installed together with an older plugin without those, both should work fine.

If we ever need to change the plugin, the process is somewhat cumbersome yet straightforward:

  1. Do the changes that you need;
  2. Search for V0001, replace it with V0002 everywhere.

to make sure that older versions of the plugin load and use the V0001 version of the relevant code, and the newer versions use V0002.

Relevant discussions:

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

peaFOp-2ar-p2

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

No.

Testing instructions:

Just like with #34297, run a Jetpack VaultPress Backup backup without credentials set up, so that the tool is then forced to upload the helper script via Jetpack API and thus trigger this code.

Make sure that the abspath property gets always returned in the install_helper_script() results.

Also, test with multiple versions/forms of various Jetpack plugins installed, e.g. the newer Jetpack VaultPress Backup plugin (with this patch), and the older main Jetpack plugin (without this patch); make sure that you still always get the abspath back.

…lasses

When two or more plugins are installed that contain a class with the same name (e.g. the main Jetpack plugin and the Jetpack VaultPress Backup plugin both ship `Automattic\Jetpack\Backup\Helper_Script_Manager` class), the Jetpack autoloader [tries to find and load the newest version of the class with that name](#34297 (comment)), and under certain circumstances it might even decide to load an older version of the class.

Specifically, we had issues with the Jetpack VaultPress Backup plugin loading an older version of the `Helper_Script_Manager` class using the newer code, in which case an `abspath` property in `Helper_Script_Manager::install_helper_script()` (#34297) wasn't always returned.

* p1703028095475669-slack-CS8UYNPEE

To avoid that behavior, and always load the *exact same* version of the class that has been shipped with the plugin, we're adding simple namespace-based versioning to `Helper_Script_Manager`, backup plugin, and other related code.

All of the classes that make up the package/plugin got moved to either the `Automattic\Jetpack\Backup\V0001` or the `Automattic\Jetpack\Transport_Helper\V0001` namespace. Code that uses said classes refers to them using the versioned namespace (e.g. `Automattic\Jetpack\Backup\V0001\Helper_Script_Manager::install_helper_script()`, so that once the plugin gets installed, it always loads and uses a specific version of its dependencies (and not an older/newer one, which it might be incompatible with).

Older versions of the Jetpack plugins don't use these namespaces (e.g. they refer to the `Helper_Script_Manager` class as `Automattic\Jetpack\Backup\Helper_Script_Manager`), so if the plugin with versioned namespaces gets installed together with an older plugin without those, both should work fine.

If we ever need to change the plugin, the process is somewhat cumbersome yet straightforward:

1. Do the changes that you need;
2. Search for `V0001`, replace it with `V0002` everywhere.

in order to make sure that older versions of the plugin load and use the `V0001` version of the relevant code, and the newer versions use `V0002`.

Relevant discussions:

* peaFOp-2ar-p2
* #34297 (comment)
@pypt pypt self-assigned this Dec 20, 2023
Copy link
Contributor

github-actions bot commented Dec 20, 2023

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the modify/backup-helper-script-manager-class-versioning branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack modify/backup-helper-script-manager-class-versioning
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Feature] WPCOM API [Package] Backup [Package] Backup Helper Script Manager [Package] Transport Helper [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Status] In Progress [Tests] Includes Tests labels Dec 20, 2023
Copy link
Contributor

github-actions bot commented Dec 20, 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.
  • ✅ 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 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 reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for January 9, 2024 (scheduled code freeze on January 8, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

  • Next scheduled release: February 6, 2024.
  • Scheduled code freeze: January 29, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

  • Next scheduled release: February 6, 2024.
  • Scheduled code freeze: January 29, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Migration plugin:

  • Next scheduled release: February 6, 2024.
  • Scheduled code freeze: January 29, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@pypt pypt marked this pull request as ready for review December 20, 2023 19:52
@pypt pypt requested review from a team December 20, 2023 19:52
@pypt pypt added [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Needs Team Review and removed [Status] In Progress labels Dec 20, 2023
@pypt pypt changed the title [WIP] Backup: Add namespace versioning to Helper_Script_Manager and other classes Backup: Add namespace versioning to Helper_Script_Manager and other classes Dec 20, 2023
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

A quick opengrok search didn't turn up anything outside of the monorepo referring to the namespaces being changed, so 🤞 hopefully it won't break Simple.

I didn't review much beyond that and the few notes inline.

@github-actions github-actions bot added the [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. label Dec 20, 2023
matticbot pushed a commit to Automattic/jetpack-react-data-sync-client that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-components that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-connection-js that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-shared-extension-utils that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-publicize-components that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-image-cdn that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-plugin-deactivation that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-publicize that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-jitm that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-stats-admin that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-lazy-images that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-action-bar that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-mu-wpcom that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-scan that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-ai-client that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-wordads that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-yoast-promo that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-identity-crisis that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-sync that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-videopress that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-forms that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-blaze that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-backup that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-my-jetpack that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-search that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

Automattic/jetpack#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f3cb0d8145c2091840343a17b0d080ee1c.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7823601613
bindlegirl pushed a commit that referenced this pull request Feb 8, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version
spsiddarthan pushed a commit that referenced this pull request Feb 15, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version
samiff pushed a commit that referenced this pull request Feb 20, 2024
…efore (#35508)

* Write helper script to ABSPATH, just like we did before

Writing to "wp-content/" has caused some issues, as some hosts don't allow PHP code from "wp-content/" to be accessed directly.

* Bump class namespace version

#34739

* changelog

* Make the test expect the right order of install locations

* Fix up project versions

* Add proxy `Package_Version` classes with different namespaces

* Revert "Add proxy `Package_Version` classes with different namespaces"

This reverts commit abd558f.

* Don't use namespace versioning in Package_Version, add <...>\V0001\Package_Version proxy

* Use correct path to Package_Version in the test

* Fix package name in a test

* Move test to Automattic\Jetpack\Backup namespace

* Move Package_Version's compatibility class to separate file

* Add (possibly) missing import

* Apply the same behavior to Automattic\Jetpack\Transport_Helper\Package_Version too

* Fix up project/package versions again

* Fix transport-helper's actions.php to point to the right Package_Version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs [Feature] Backup & Scan [Feature] WPCOM API [Package] Backup Helper Script Manager [Package] Backup [Package] Transport Helper [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Pri] BLOCKER [Tests] Includes Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants