Skip to content

Fix regex invalid delimiter test for PHP 8.2#181

Merged
schlessera merged 3 commits into
wp-cli:mainfrom
brandonpayton:fix-regex-invalid-delimiter-test-for-php-8-2
May 10, 2023
Merged

Fix regex invalid delimiter test for PHP 8.2#181
schlessera merged 3 commits into
wp-cli:mainfrom
brandonpayton:fix-regex-invalid-delimiter-test-for-php-8-2

Conversation

@brandonpayton
Copy link
Copy Markdown
Contributor

It looks like the invalid-regex-delimiter test is failing under PHP 8.2. This was noticed because of a failing test under another PR(#180).

This PR fixes the test to deal with a changing preg_match() error message in PHP 8.2.

Behat is new to me, so perhaps there is a better way to approach this. But hopefully this is helpful.

@brandonpayton brandonpayton requested a review from a team as a code owner May 10, 2023 00:52
Comment thread features/search-replace.feature Outdated
@schlessera schlessera added the scope:testing Related to testing label May 10, 2023
@schlessera schlessera added this to the 2.0.21 milestone May 10, 2023
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
@brandonpayton
Copy link
Copy Markdown
Contributor Author

Thanks, @schlessera. I went ahead and applied your patch. It's much better to have a single test like that.

I'll move the test back to its original location and maybe tweak the comment a bit.

@schlessera schlessera merged commit 5c54825 into wp-cli:main May 10, 2023
@brandonpayton brandonpayton deleted the fix-regex-invalid-delimiter-test-for-php-8-2 branch May 10, 2023 15:30
@brandonpayton
Copy link
Copy Markdown
Contributor Author

Strange. Looks like multiple commits from this made it into the main branch. I apologize if I should have rebased this PR first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants