-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 4.3 deprecated APIs #11679
Remove 4.3 deprecated APIs #11679
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.
I'm curious about removing @wordpress/deprecated
from the code. Won't we want to continue using it?
@@ -2479,7 +2479,6 @@ | |||
"@wordpress/compose": "file:packages/compose", | |||
"@wordpress/core-data": "file:packages/core-data", | |||
"@wordpress/data": "file:packages/data", | |||
"@wordpress/deprecated": "file:packages/deprecated", |
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.
😱 is that correct?
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 think we added a deprecation in #11543, fwiw.)
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 is correct in that the current state of master after this branch would have no occurrence of @wordpress/deprecated
in edit-post
.
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's correct as the edit-post
package don't have any other deprecations anymore.
Ideally, we don't add more deprecations now as we're in API Freeze and keep supporting both APIs unless we think it's very unlikely that someone is using the said API in which I case you can add the dependency back in the PR.
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.
But we could have API changes post-5.0, right? I assumed we'd still want to be able to deprecate APIs after the core merge.
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.
@tofumatt yes, but the process is not defined yet.
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.
The dependencies should only be those which are actively used. If we need to deprecate in the future, it can be brought back.
/** | ||
* WordPress dependencies | ||
*/ | ||
import deprecated from '@wordpress/deprecated'; |
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.
The module is mocked in test/selectors.js
which should be removed as 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.
The module is mocked in
test/selectors.js
which should be removed as well.
Aside: While I like this pattern of mocking @wordpress/deprecated
, it's certainly hard to discover in these removals.
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, also it doesn't seem like it was useful here as the tests were passing anyway.
@@ -2479,7 +2479,6 @@ | |||
"@wordpress/compose": "file:packages/compose", | |||
"@wordpress/core-data": "file:packages/core-data", | |||
"@wordpress/data": "file:packages/data", | |||
"@wordpress/deprecated": "file:packages/deprecated", |
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 is correct in that the current state of master after this branch would have no occurrence of @wordpress/deprecated
in edit-post
.
No description provided.