-
Notifications
You must be signed in to change notification settings - Fork 79
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
Unit Tests: Run under PHP 8.1, same as production #1457
Open
dd32
wants to merge
28
commits into
production
Choose a base branch
from
tests/unit-tests-php81
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`get_site_meta()` will return an empty string here when the value is not set or invalid input is provided, which is not acceptable to `in_array()`. By setting it to an empty array in a falsy case, we avoid the fatal and retain previous behaviour.
This is in part due to composer.json making use of `post-update-cmd` which doesn't execute on install with a lock file present, only update or install without a lock file.
> ������������������������������������������������������Warning from https://repo.packagist.org: Support for Composer 1 will be shutdown on August 1st 2025. You should upgrade to Composer 2. See https://blog.packagist.com/shutting-down-packagist-org-support-for-composer-1-x/
The unit tests don't have the needed network sites setup, that's why this testcase class exists.
…ork setup, with the hard-coded blog_ids that WordCamp expects.
… to see if it passes.
dd32
commented
Feb 18, 2025
@@ -77,7 +77,9 @@ function fetch_unsafe_remote_css( $remote_css_url ) { | |||
*/ | |||
function sanitize_unsafe_css( $unsafe_css ) { | |||
if ( ! class_exists( 'Jetpack_Custom_CSS_Enhancements' ) ) { | |||
if ( version_compare( JETPACK__VERSION, '11.6', '<' ) ) { | |||
if ( version_compare( JETPACK__VERSION, '13.7.1', '>' ) ) { | |||
return ''; // Custom CSS not included in Jetpack anymore. |
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 is obviously a big TODO; to replace the Jetpack CSS sanitization dependency with our own bundled here.
This is needed, and was one of the reasons for this PR in the first places.
This change should be reverted from the PR really.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR is for testing the github actions.
WordCamp.org has switched to PHP 8.1, so the unit tests should be running under the same environment.
There's likely more steps needed here.