Skip to content

Conversation

@jeherve
Copy link
Member

@jeherve jeherve commented Jul 8, 2020

Changes proposed in this Pull Request:

I left out everything in the compat package.

Jetpack product discussion

  • N/A

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

  • No

Testing instructions:

  • Do tests pass?
  • There is a lot of code that was touched, so I'd recommend looking at different Jetpack features, the connection process, as well as the matching WordPress.com diff and whether those functions / methods are still used somewhere on WordPress.com.

Copy link

@test-case-reminder test-case-reminder bot left a 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.

Gutenberg extensions

  • Use Core's block editor
  • Use latest stable Gutenberg plugin

Blocks

  • Tiled Gallery
  • Business Hours
  • Calendly
  • Form
  • Contact Info
  • Eventbrite
  • Google calendar
  • Mailchimp
  • Map
  • OpenTable
  • Pinterest
  • Podcast player
  • Star rating
  • Recurring Payments
  • Repeat Visitor
  • Revue
  • Simple Payments
  • Slideshow

Extensions

  • Publicize
  • Likes

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_IFRAME to true
  • Disconnect/reconnect connection
  • Secondary user connection
  • Connection on multisite

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.

@github-actions github-actions bot added the [Status] Needs Package Release This PR made changes to a package. Let's update that package now. label Jul 8, 2020
@jetpackbot
Copy link
Collaborator

jetpackbot commented Jul 8, 2020

Warnings
⚠️ The Privacy section is missing for this PR. Please specify whether this PR includes any changes to data or privacy.
⚠️

pre-commit hook was skipped for one or more commits

This is an automated check which relies on PULL_REQUEST_TEMPLATE. We encourage you to follow that template as it helps Jetpack maintainers do their job. If you think 'Testing instructions' or 'Proposed changelog entry' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS against e03aa9e

@jeherve jeherve force-pushed the rm/deprecated-code branch from d1efebd to a530616 Compare July 9, 2020 09:02
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello jeherve! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D46167-code before merging this PR. Thank you!
This revision will be updated with each commit to this PR

@jeherve jeherve force-pushed the rm/deprecated-code branch 2 times, most recently from f55d270 to a19ff23 Compare July 10, 2020 15:57
@jeherve jeherve added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Jul 16, 2020
@jeherve jeherve added this to the 8.8 milestone Jul 16, 2020
kraftbj
kraftbj previously approved these changes Jul 20, 2020
Copy link
Contributor

@kraftbj kraftbj left a comment

Choose a reason for hiding this comment

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

I'd like to see about running this realize against the Analyzer to see what might break. This would be a good thing to check it with. :)

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Jul 20, 2020
@jeherve
Copy link
Member Author

jeherve commented Jul 21, 2020

I'd like to see about running this realize against the Analyzer to see what might break

Yes, that'd be nice, but last time I tried I ran out of memory and could not get it to work. @zinigor Do you still have your setup to analyze against all plugins in the directory? Do you think you could run it with this PR?

@zinigor
Copy link
Contributor

zinigor commented Jul 21, 2020

Sure thing, I'll run it today and report my findings here.

@jeherve
Copy link
Member Author

jeherve commented Jul 21, 2020

Thank you!

@zinigor
Copy link
Contributor

zinigor commented Jul 23, 2020

I ran the analyzer, here's the results that it found in the updated WordPress plugins repo:

# Akismet
method_missing,class.akismet-admin.php,1130,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"

# Certly Guard
method_missing,class.certly-admin.php,948,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"

# Jetpack Subscription Form
method_missing,jetpack-subscription.php,253,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"

# Reflect
function_missing,reflect.php,93,"Function migrate() is missing",migrate()
function_missing,reflect.php,142,"Function migrate() is missing",migrate()

# SlimJetpack
method_missing,class.jetpack-cli.php,93,"Class static method \Jetpack::unlink_user($user_id=\null) is missing","\Jetpack::unlink_user($user_id=\null)"
method_missing,class.jetpack-client.php,87,"Class static method \Jetpack::fix_url_for_bad_hosts($url) is missing","\Jetpack::fix_url_for_bad_hosts($url)"
method_missing,modules/videopress/videopress.php,154,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,1431,"Class static method \Jetpack::clean_nonces($all=\false) is missing","\Jetpack::clean_nonces($all=\false)"
method_missing,class.jetpack.php,1433,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,1469,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,1554,"Class static method \Jetpack::fix_url_for_bad_hosts($url) is missing","\Jetpack::fix_url_for_bad_hosts($url)"
method_missing,class.jetpack.php,1554,"Class static method \Jetpack::api_url($relative_url) is missing","\Jetpack::api_url($relative_url)"
method_missing,class.jetpack.php,2754,"Class static method \Jetpack::api_url($relative_url) is missing","\Jetpack::api_url($relative_url)"
method_missing,class.jetpack.php,3115,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,3135,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,3302,"Class static method \Jetpack::fix_url_for_bad_hosts($url) is missing","\Jetpack::fix_url_for_bad_hosts($url)"
method_missing,class.jetpack.php,3302,"Class static method \Jetpack::api_url($relative_url) is missing","\Jetpack::api_url($relative_url)"
method_missing,class.jetpack.php,3594,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,3634,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack.php,3881,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,class.jetpack-ixr-client.php,15,"Class static method \Jetpack::xmlrpc_api_url() is missing","\Jetpack::xmlrpc_api_url()"
method_missing,class.jetpack-client-server.php,79,"Class static method \Jetpack::update_user_token($user_id,$token,$is_master_user) is missing","\Jetpack::update_user_token($user_id,$token,$is_master_user)"
method_missing,class.jetpack-client-server.php,170,"Class static method \Jetpack::fix_url_for_bad_hosts($url) is missing","\Jetpack::fix_url_for_bad_hosts($url)"
method_missing,class.jetpack-client-server.php,170,"Class static method \Jetpack::api_url($relative_url) is missing","\Jetpack::api_url($relative_url)"
method_missing,class.jetpack-debugger.php,88,"Class static method \Jetpack::fix_url_for_bad_hosts($url) is missing","\Jetpack::fix_url_for_bad_hosts($url)"

# VaultPress
method_missing,vaultpress.php,2999,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"
method_missing,vaultpress.php,3018,"Class static method \Jetpack::load_xml_rpc_client() is missing","\Jetpack::load_xml_rpc_client()"

$ Widget for EventBrite API
function_missing,frontend/class-frontend.php,65,"Function jetpack_photon_parse_url($url,$component=-1) is missing","jetpack_photon_parse_url($url,$component=-1)"

The migrate thing is weird though, I don't know where it came from. To sanity check these results here's what the difference to the latest Jetpack version:

method_missing,modules/comments.php,27,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,modules/likes.php,16,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,modules/masterbar/masterbar.php,116,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,modules/photon-cdn.php,17,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,modules/comment-likes.php,16,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,modules/shortcodes/videopress.php,13,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,modules/photon.php,15,"Class static method \Jetpack::dns_prefetch($new_urls=\null) is missing","\Jetpack::dns_prefetch($new_urls=\null)"
method_missing,class.jetpack-gutenberg.php,76,"Class static method \Jetpack_Gutenberg::register_plugin($slug) is missing","\Jetpack_Gutenberg::register_plugin($slug)"
method_missing,class.jetpack-gutenberg.php,94,"Class static method \Jetpack_Gutenberg::set_extension_unavailability_reason($slug,$reason) is missing","\Jetpack_Gutenberg::set_extension_unavailability_reason($slug,$reason)"

@jeherve jeherve added [Status] Blocked / Hold and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Jul 24, 2020
@jeherve
Copy link
Member Author

jeherve commented Jul 24, 2020

Putting this on hold since we'll need to make changes to Akismet and VaultPress first.

@jeherve jeherve removed this from the 8.8 milestone Jul 24, 2020
@kraftbj kraftbj added this to the jetpack/10.3 milestone Oct 8, 2021
@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Oct 8, 2021
We'll just leave the test in, since it could be useful in the future for other file deprecations.
@jeherve jeherve added [Status] Needs Review This PR is ready for review. and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Oct 11, 2021
@jeherve
Copy link
Member Author

jeherve commented Oct 11, 2021

@kraftbj Sorry, one of the tests was failing, I had to bring the provider back. This will consequently need another review. Thank you!

kraftbj
kraftbj previously approved these changes Oct 11, 2021
@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Oct 11, 2021
@jeherve
Copy link
Member Author

jeherve commented Oct 14, 2021

r233300-wpcom

@jeherve
Copy link
Member Author

jeherve commented Oct 14, 2021

@kraftbj I had to update a package's version number. Could I ask for one last review? :)

Thank you!

@jeherve jeherve merged commit 92cb896 into master Oct 14, 2021
@jeherve jeherve deleted the rm/deprecated-code branch October 14, 2021 13:24
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D46167-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 14, 2021
davidlonjon added a commit that referenced this pull request Oct 14, 2021
…workflow

# By Chris R (2) and others
# Via GitHub
* master:
  VaultPress: Update Changelog and stable tag for 2.2.0 release (#21413)
  Janitorial: clean up deprecated code (#16434)
  Update/boost Use Admin_UI package to register top level menu (#21345)
  package.json: fix spelling of deprecated in pnpm tasks (#21411)
  Heartbeat: fix typo in README (#21410)
  Premium Content Block: fix icon color (#21327)
  Decide CSS files to proxy on the client-side (#21392)

# Conflicts:
#	projects/plugins/boost/composer.lock
kraftbj added a commit to Automattic/vip-go-mu-plugins that referenced this pull request Nov 4, 2021
This function has been deprecated since 9.5 and removed in 10.3. See Automattic/jetpack#16434
anomiex added a commit that referenced this pull request May 10, 2024
Notable changes:

* Remove `Jetpack_User_Agent_Info::is_OperaMobile()`. #16434 removed the
  jetpack-device-detect function this was calling in October 2021, but
  missed this caller.
* Remove `jetpack_server_sandbox()` and
  `jetpack_server_sandbox_request_parameters()`. Due to a wrong
  namespace in #21128, they'd have thrown fatals since October 2021.
* Use `$skin` instead of `$upgrader->skin`, it's the same object but not
  typed as a parent class. Should be no change to functionality.
* Add some missing methods to `WPCOM_JSON_API`.
* Add some missing abstract methods to SAL_Site, and implement in
  Jetpack_Site.
* Fix `SAL_Token::is_global()`.
* Remove `views/admin/deactivation-dialog.php`, unused since #21048 in
  November 2021.
* Add `@phan-var-force` in a lot of "template" files. I'm not entirely
  happy with this, it pollutes the global scope for any subsequent files
  processed, but short of writing a Phan plugin that somehow adjusts the
  scope for only the file I can't find a better idea.
anomiex added a commit that referenced this pull request May 14, 2024
Notable changes:

* Remove `Jetpack_User_Agent_Info::is_OperaMobile()`. #16434 removed the
  jetpack-device-detect function this was calling in October 2021, but
  missed this caller.
* Remove `jetpack_server_sandbox()` and
  `jetpack_server_sandbox_request_parameters()`. Due to a wrong
  namespace in #21128, they'd have thrown fatals since October 2021.
* Use `$skin` instead of `$upgrader->skin`, it's the same object but not
  typed as a parent class. Should be no change to functionality.
* Add some missing methods to `WPCOM_JSON_API`.
* Add some missing abstract methods to SAL_Site, and implement in
  Jetpack_Site.
* Fix `SAL_Token::is_global()`.
* Remove `views/admin/deactivation-dialog.php`, unused since #21048 in
  November 2021.
* Add `@phan-var-force` in a lot of "template" files. I'm not entirely
  happy with this, it pollutes the global scope for any subsequent files
  processed, but short of writing a Phan plugin that somehow adjusts the
  scope for only the file I can't find a better idea.
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.