-
Notifications
You must be signed in to change notification settings - Fork 103
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
wp-parsely: Only trigger warning when actually specifying a version via filter #2344
Conversation
2685406
to
56da886
Compare
56da886
to
b6998b1
Compare
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.
LGTM
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.
LGTM. Noting that tests run without explicitly setting WP_TESTS_DIR=/tmp/wordpress-tests-lib
as per the PR description.
Thanks for the reviews!
In my case, it didn't. I've got that specified in my |
Description
This is currently reporting an erroneous warning: "Invalid value configured via wpvip_parsely_version filter" even when a site is not overriding the filter. This only performs the check when it is.
This also includes a first pass at integration tests for the plugin. Since WordPress is already mostly loaded and the plugin is sourced prior to running phpunit test cases, we have to hook into the phpunit bootstrap file to vary behavior. We do that by leveraging environment variables specified on the test runner host machine.
These will be hooked into CI in a follow up PR.
Changelog Description
Plugin Updated: VIP Parse.ly Integration -- Fix spurious PHP Warning
We made some behind-the-scenes changes that will help customers try Parse.ly on their sites more easily.
Checklist
Please make sure the items below have been covered before requesting a review:
Steps to Test
WP_TESTS_DIR=/tmp/wordpress-tests-lib ./bin/phpunit-docker.sh --file tests/parsely/test-mu-parsely-integration.php
WPVIP_PARSELY_INTEGRATION_TEST_MODE=option_enabled WP_TESTS_DIR=/tmp/wordpress-tests-lib ./bin/phpunit-docker.sh --file tests/parsely/test-mu-parsely-integration.php
WPVIP_PARSELY_INTEGRATION_TEST_MODE=filter_enabled WP_TESTS_DIR=/tmp/wordpress-tests-lib ./bin/phpunit-docker.sh --file tests/parsely/test-mu-parsely-integration.php
WPVIP_PARSELY_INTEGRATION_TEST_MODE=filter_and_option_enabled WP_TESTS_DIR=/tmp/wordpress-tests-lib ./bin/phpunit-docker.sh --file tests/parsely/test-mu-parsely-integration.php
WPVIP_PARSELY_INTEGRATION_PLUGIN_VERSION=2.5 WPVIP_PARSELY_INTEGRATION_TEST_MODE=filter_enabled WP_TESTS_DIR=/tmp/wordpress-tests-lib ./bin/phpunit-docker.sh --file tests/parsely/test-mu-parsely-integration.php
WPVIP_PARSELY_INTEGRATION_PLUGIN_VERSION=2.4 WPVIP_PARSELY_INTEGRATION_TEST_MODE=filter_enabled WP_TESTS_DIR=/tmp/wordpress-tests-lib ./bin/phpunit-docker.sh --file tests/parsely/test-mu-parsely-integration.php
PHP Warning: Invalid value configured via wpvip_parsely_version filter: 2.6 in /app/wp-parsely.php on line 59
: