-
Notifications
You must be signed in to change notification settings - Fork 2k
Update wp-env and some ETK PHP fixes #79266
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
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.
PHP 8 does not allow you to access arrays directly if the index doesn't exist.
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.
PHP 8 noticed these fields were undefined when going through other tests, which probably means the mock data wasn't fully created in the first place.
apps/editing-toolkit/editing-toolkit-plugin/full-site-editing-plugin.php
Outdated
Show resolved
Hide resolved
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 directory doesn't exist any more
...kit-plugin/wpcom-block-editor-nux/class-wp-rest-wpcom-block-editor-nux-status-controller.php
Outdated
Show resolved
Hide resolved
composer.json
Outdated
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 wp-env update basically meant that you should manage your own phpunit version instead of bundling it, so we do that here.
|
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
|
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
39135aa to
9db7293
Compare
9db7293 to
9a79167
Compare
|
I removed the risky aspects of this, so what remains is really basic test code (verified by CI), and wp-env configuration (verified by CI and myself). The other non-test PHP changes are basically just phpcbf autofixes. After testing, I'm confident this is safe to merge 👍 |
|
This is some great work @noahtallen 🙌 The |
As I began working @tyxla's comment here (#79097 (comment)), I realized it'd be good to update various wp-env/ETK things (which I've been putting off for a while).
Proposed Changes
It's been a while since I touched wp-env in Calypso. This updates our config to make it compatible with new wp-env versions, which in turn means we're updating phpunit and setting a newer PHP version. As a result, there were a few other things to fix too.
Importantly, there are some features in ETK which were not written to work in local environments. In fact, they crash when not running on Automattic infrastructure. I decided to leave fixes for these out of the PR to make it less risky, but the result is that some pages of wp-env do not work. I will follow up with teams to try to get this resolved.
Local Testing Instructions
cd apps/editing-toolkityarn build)composer install, runyarn test:phplocally.Wpcom testing instructions
install-plugin.sh etk update-wp-env.