Cannot declare class error because name already in use when you know for sure it's only defined in one place
If you get an error like this:
PHP Fatal error: Cannot declare class
Drupal\search_api\Plugin\search_api\processor\ManualBoost
, because the name is already in use in/var/www/drupal/web/profiles/contrib/findit/modules/custom/drutopia_findit_search/src/Plugin/search_api/processor/ManualBoost.php
on line 20
And you are certain you’ve only declared the class in one place, and you run grep and confirm that the name is only ever used in the one place…
Check your namespace declaration at the top of your file. That’s almost certainly what’s incorrect.