I am trying to convert a module from D7 to D8. I had parts of it working earlier but after some code edits i now get:
Fatal error: Cannot redeclare class Drupal\delete_fields\DeleteFields in E:\www\drupal8\sites\all\modules\delete_fields\src\Form\DeleteFields.php on line 128
when i try to do a cache clear.
128 is the last line of the file and i have searched entire project and the only place DeleteFields shows up is in my module’s class file:
namespace Drupal\delete_fields; /** * Defines a class to build a listing of fields. * * @see \Drupal\field\Entity\Field * @see field_ui_entity_info() */ class DeleteFields extends ConfigEntityListBuilder {
My guess is the class is getting cached somewhere and there is a bug in Drupal which is not letting this get cleared.
I tried drush rr but it seems like this is no longer available (i get command not found); even though it is listed in drush docs.