-
Notifications
You must be signed in to change notification settings - Fork 847
remove Jetpack dependencies from the Connection package #18952
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
remove Jetpack dependencies from the Connection package #18952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some suggested test cases for this PR.
Connection
- In-place connection with free plan
- In-place connection with paid plan
- In-place connection with product purchase
- Classic connection. Use Safari, or set a constant
JETPACK_SHOULD_NOT_USE_CONNECTION_IFRAMEto true - Disconnect/reconnect connection
- Secondary user connection
- Connection on multisite
Verify that the changes are compatible with the plugins that use the connection package.
- WooCommerce Payments
- Jetpack Boost
- Previous versions of Jetpack
If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration file.
|
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 🤖 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. Jetpack plugin:
|
| */ | ||
| public function disconnect_blog() { | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need that wp_set_current_user() bit here because the user is already set at Jetpack_XMLRPC_Server::login -> https://github.com/Automattic/jetpack/blob/update%2Fconnection-package-xmlrpc-independence/projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php#L600
sergeymitr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the tests are failing at the moment because of the removed methods.
|
@jeherve @sergeymitr PR is good for review again |
anomiex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave it a once-over. I'd recommend at least fixing the comment on line 147; the rest I don't care so much about.
projects/packages/connection/tests/php/test_jetpack_xmlrpc_server.php
Outdated
Show resolved
Hide resolved
projects/packages/connection/tests/php/test_jetpack_xmlrpc_server.php
Outdated
Show resolved
Hide resolved
projects/packages/connection/tests/php/test_jetpack_xmlrpc_server.php
Outdated
Show resolved
Hide resolved
…ver.php Co-authored-by: Brad Jorsch <[email protected]>
…ver.php Co-authored-by: Brad Jorsch <[email protected]>
anomiex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I node that jetpack.remoteRegister and jetpack.remoteConnect still call methods on the Jetpack class. Maybe that's out of scope for this PR though.
Haven't manually tested, but it looks like there is test coverage.
| * @param array $core_methods Available core XML-RPC methods. | ||
| * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server. | ||
| * @param array $core_methods Available core XML-RPC methods. | ||
| * @param \WP_User|bool $user Information about a given WordPress user. False if authenticated with blog token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we document in which version a parameter was added to a filter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks for the reminder. Done in 21418d1
This reverts commit 24b7b43.
I've checked all the I reverted the commit in which I moved |
|
@sergeymitr @jeherve could you have a look at this again? I'd love to get it merged. I'm touching some files in another PR that will likely conflict and I'd also want to use the new test files in the Conncetion package to add some tests in the other PR |
|
Hi @leogermani. Methods in the class It's true for methods |
Thanks for spotting this @sergeymitr . They should be static, yes. I fixed it. I also removed an old debugging comment that was there. |
sergeymitr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR removes some Jetpack-specific XMLRPC endpoints from the Connection package and places it in the Jetpack plugin.
This should not change anything for sites with the Jetpack plugin active.
Changes proposed in this Pull Request:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
1164484600834010-as-1199928370054538
Testing instructions:
successstringProposed changelog entry for your changes: