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

Deprecation notices: add details about file/function removals #16444

Merged
merged 4 commits into from
Jul 9, 2020

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Jul 9, 2020

Changes proposed in this Pull Request:

In #16433, we determined that we would remove deprecated files and functions 6 months after they've been deprecated.

Let's communicate this to site owners as well, by outputting additional details in the error logs when a deprecation notice is issued.

Jetpack product discussion

  • N/A

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

  • N/A

Testing instructions:

  • Add the following into a plugin on your site:
function jeherve_test_deprecated_things() {
	require_once JETPACK__PLUGIN_DIR . 'modules/minileven.php';
	$deprecated_function = jetpack_check_mobile();
}
add_action( 'init', 'jeherve_test_deprecated_things' );
  • Load your site
  • Check your error log: you should see the following:
[09-Jul-2020 08:19:37 UTC] The minileven.php file will be removed from the Jetpack plugin in version 8.9.
[09-Jul-2020 08:19:37 UTC] PHP Deprecated:  minileven.php is <strong>deprecated</strong> since version jetpack-8.3.0 with no alternative available. in /var/www/html/wp-includes/functions.php on line 4913
[09-Jul-2020 08:19:37 UTC] The jetpack_check_mobile function will be removed from the Jetpack plugin in version 8.9.
[09-Jul-2020 08:19:37 UTC] PHP Deprecated:  jetpack_check_mobile is <strong>deprecated</strong> since version jetpack-8.3.0! Use jetpack_is_mobile instead. in /var/www/html/wp-includes/functions.php on line 4713

Proposed changelog entry for your changes:

  • Deprecation Notices: provide more information about deprecated files and functions.

In #16433, we determined that we would remove deprecated files and functions 6 months after they've been deprecated.

Let's communicate this to site owners as well, by outputting additional details in the error logs when a deprecation notice is issued.
@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it General [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jul 9, 2020
@jeherve jeherve added this to the 8.8 milestone Jul 9, 2020
@jeherve jeherve self-assigned this Jul 9, 2020
@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 D46163-code before merging this PR. Thank you!
This revision will be updated with each commit to this PR

@jetpackbot
Copy link

jetpackbot commented Jul 9, 2020

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16444

Scheduled Jetpack release: August 4, 2020.
Scheduled code freeze: July 28, 2020

Generated by 🚫 dangerJS against 51fa1b1

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 really like this. Some questions and a couple of suggestions.

functions.global.php Show resolved Hide resolved
functions.global.php Show resolved Hide resolved
functions.global.php Outdated Show resolved Hide resolved
functions.global.php Outdated Show resolved Hide resolved
functions.global.php Show resolved Hide resolved
@jeherve
Copy link
Member Author

jeherve commented Jul 9, 2020

Thanks for the feedback. I believe I've addressed everything, it should be ready for another round.

@kraftbj kraftbj 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 Jul 9, 2020
@jeherve jeherve merged commit 009ebb7 into master Jul 9, 2020
@jeherve jeherve deleted the update/deprecation-errors branch July 9, 2020 17:26
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Jul 9, 2020
@jeherve
Copy link
Member Author

jeherve commented Jul 9, 2020

r210265-wpcom

jeherve added a commit that referenced this pull request Jul 28, 2020
jeherve added a commit that referenced this pull request Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Touches WP.com Files [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants