-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make GCB compatible with 6.5
#178
Conversation
* @param {Object} post Post object. | ||
*/ | ||
const setupEditor = ( post ) => { | ||
setupEditorState( 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.
This file is a big wrapper for setupEditorState
.
It's not needed anymore.
How to test GCB for the next WP versionIf you're wondering how we test this plugin for WP releases… We just bump the version in the PHPUnit tests and e2e tests. For example, with WP diff --git a/.circleci/config.yml b/.circleci/config.yml
index 6faa3d89..02eb5165 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -86,7 +86,7 @@ jobs:
- run:
name: Installing WordPress and setting up tests
command: |
- git clone git://develop.git.wordpress.org/ wordpress-develop
+ git clone -b 6.5 git://develop.git.wordpress.org/ wordpress-develop
cp wordpress-develop/wp-tests-config-sample.php wordpress-develop/wp-tests-config.php
sed -i 's/localhost/127.0.0.1/g' wordpress-develop/wp-tests-config.php
sed -i 's/yourpasswordhere/<insert password here>/g' wordpress-develop/wp-tests-config.php
diff --git a/.wp-env.json b/.wp-env.json
index b00b8969..04e74fa4 100644
--- a/.wp-env.json
+++ b/.wp-env.json
@@ -1,5 +1,5 @@
{
- "core": null,
+ "core": "WordPress/WordPress#6.5-branch",
"plugins": [ ".", "./tests/e2e/plugins/testing-blocks" ],
"phpVersion": "8.3"
}
…then we see if the tests pass. Then, we'll revert that change, and merge the PR, like this PR. These tests are complete enough that once they pass, you'll know GCB is compatible with the next WP version. There's no need for manual testing. |
setupEditor( post ); | ||
|
||
if ( setEditedPost ) { | ||
setEditedPost( post.type, post.id ); |
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.
Fixes a console error in WP 6.5
:
wp.data.dispatch( 'core/editor' ).setupEditorState is deprecated since version 6.5. Please use wp.data.dispatch( 'core/editor' ).setEditedPost instead.
Thanks so much for approving this, @dreamwhisper! |
Changes
6.5
. We'll need to release this before6.5
.Testing instructions
Not needed