In core/modules/search/lib/Drupal/search/Form we have several classes.

There is SearchBlockForm, which is used for searching from the search block.
And there is SearchPageForm, which is used for searching from the search page.

I cannot figure out what SearchForm is used for though. I think it is leftover cruft and should be removed? I grepped through Core and couldn't find it being used anywhere.

CommentFileSizeAuthor
#1 2170635.patch3.4 KBjhodgdon

Comments

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new3.4 KB

Just to confirm, here is a patch to remove the file.

ianthomas_uk’s picture

See also #2042807-107: Convert search plugins to use a ConfigEntity and a PluginBag

tim.plunkett's sandbox had shown SearchPageForm.php as being a rename of SearchForm.php, but when I rerolled into a single commit it was a new file. I assumed it was just git being weird, but maybe it was an intentional change.

jhodgdon’s picture

OK that explains where it came from. Assuming the tests pass, we should get rid of it again. I am pretty sure it isn't being used (via grep).

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

I was trying to rename SearchForm to SearchPageForm, but it must have gotten busted in a reroll, and never was removed.

tim.plunkett’s picture

Title: Why do we have SearchForm? » Remove leftover SearchForm (duplicate of renamed SearchPageForm)
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0c7e0f7 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.