Cannot declare class because the name is already in use I'm trying to port a Craft 2 plugin to Craft 3, and don't seem smart enough to work out the namespaces. I've stripped out everything except what the docs recommend, but keep getting Cannot declare class kr37\Calendar37\Calendar37, because the name is already in use  Thank you in advance for any suggestions.

Folder structure

composer.json
src/Plugin.php

Plugin.php

namespace kr37\Calendar37;

class Calendar37 extends \craft\base\Plugin
{
    public function init()
    {
        parent::init();

        // Custom initialization code goes here...
    }
}


composer.json

{
  "name": "kr37/calendar37",
  "description": "Event calendar with unrestricted repetition",
  "version": "3.0.18046",
  "type": "craft-plugin",
  "minimum-stability": "dev",
  "require": {
    "craftcms/cms": "^3.0.1"
  },
  "autoload": {
    "psr-4": {
      "kr37\\calendar\\": "src/"
    }
  },
  "support": {
    "email": "???"
  },
  "extra": {
    "handle": "calendar37",
    "name": "Calendar",
    "developer": "???",
    "developerUrl": "???",
    "hasSettings": "true",
    "hasCpSection": "true"
  }
}
At this point, after much playing around it seems to be working (at least on to the next bit of debugging).

To sum up, it was mostly changes to composer.json, followed by 

composer remove kr37/calendar37
composer require kr37/calendar37


src/Plugin.php became src/Calendar37.php
Added "class": "kr37\\calendar37\\Calendar37" to the "extra" part of composer.json
Corrected the autoload "psr-4" to "kr37\\calendar37\\": "src/"
Made sure that all the names matched up just right.
This error, "because the name is already in use," should really be "because the name doesn't match up."