search-replace-command icon indicating copy to clipboard operation
search-replace-command copied to clipboard

Refactor `WP_CLI\SearchReplacer` functionality.

Open gitlost opened this issue 7 years ago • 0 comments

See https://github.com/wp-cli/search-replace-command/pull/62#discussion_r167445807

The WP_CLI\SearchReplacer class now takes a load of args on construction which just mirror those being set in Search_Replace_Command which doesn't make much sense to me.

I think it should be deprecated (and left around unused for BC maybe) and its functionality either put straight into Search_Replace_Command (as it once was 29454e3), or put into a utils function (as it once was aa7df69) where it would now take a closure callback that would have all the info and do the actual replacement.

Note also that the phpunit tests tests/test-search-replace.php were never moved from wp-cli/wp-cli.

gitlost avatar Feb 11 '18 21:02 gitlost