wp-cli / search-replace-command

Searches/replaces strings in the database.
MIT License
57 stars 45 forks source link

Fix regex invalid delimiter test for PHP 8.2 #181

Closed brandonpayton closed 1 year ago

brandonpayton commented 1 year ago

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 commented 1 year ago

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.

brandonpayton commented 1 year ago

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