Skip to content

fix: Fix failing tests for WP 6.4#2838

Merged
gchtr merged 2 commits into2.xfrom
2.x-fix-tests
Nov 9, 2023
Merged

fix: Fix failing tests for WP 6.4#2838
gchtr merged 2 commits into2.xfrom
2.x-fix-tests

Conversation

@gchtr
Copy link
Copy Markdown
Member

@gchtr gchtr commented Nov 9, 2023

Issue

With the release of WordPress 6.4, we’re running into lots of errors.

Solution

Turns out that WordPress still always calls the_block_template_skip_link(), which always causes a _deprecated_function() notice. My solution is to add @expectedDeprecated calls.

I also excluded the docs/ folder from the PHPStan checks.

@nlemoine Can we also ignore the docs for the PHP Lint workflow? We’re getting errors there, too: https://github.com/timber/timber/actions/runs/6808609995/job/18513339121?pr=1617.

Impact

Less noise in tests.

Usage Changes

None.

Considerations

Maybe.

Testing

Yes.

@gchtr gchtr added the 2.0 label Nov 9, 2023
@gchtr gchtr requested a review from nlemoine November 9, 2023 08:05
@gchtr
Copy link
Copy Markdown
Member Author

gchtr commented Nov 9, 2023

Copy link
Copy Markdown
Member

@nlemoine nlemoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's fine like this. Thanks for tackling this last hour issue :)

@gchtr
Copy link
Copy Markdown
Member Author

gchtr commented Nov 9, 2023

And now, of course tests fail for lower WordPress versions, because the deprecation is not there. But I think that’s fine for the moment.

@gchtr gchtr merged commit ee467c6 into 2.x Nov 9, 2023
@gchtr gchtr deleted the 2.x-fix-tests branch November 9, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants