title: package:discovery does not find my ServiceProvider
body: <p>I have created a custom Laravel package. Its hosted on a private repository.</p>
  
  <p>When I try to install the package in a Laravel application like this:</p>
  
  <pre><code>composer require memberportal/congress-models
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>In ProviderRepository.php line 208:
  
    Class 'Memberportal\CongressesModels\CMServiceProvider' not found  
  
  
  Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
  
  Installation failed, reverting ./composer.json to its original content.
  </code></pre>
  
  <p>I have double checked everything a hundred times, but I am clueless why he doesn't find the class <code>CMServiceProvider.php</code>.</p>
  
  <p>Do I need to specify the provider anywhere else then in the <code>composer.json</code>?</p>
  
  <p>This is the content of <code>composer.json</code> from my package:</p>
  
  <pre><code>{
      "name": "memberportal/congress-models",
      "description": "Takes care of the models between API and client",
      "type": "metapackage",
      "authors": [
          {
              "name": "My name",
              "email": "my@email.com"
          }
      ],
      "version" : "1.0",
      "minimum-stability": "stable",
      "require": {
          "laracasts/presenter": "^0.2.2"
      },
      "require-dev": {
          "orchestra/testbench": "^4.0"
      },
      "autoload": {
          "psr-4": {
            "Memberportal\\CongressesModels\\": "src"
          }
      },
      "autoload-dev": {
        "psr-4": {
            "Memberportal\\CongressesModels\\Tests\\": "tests"
          }
      },
      "extra": {
          "laravel": {
              "providers": [
                  "Memberportal\\CongressesModels\\CMServiceProvider"
              ]
          }
      }
  }
  </code></pre>
  
  <p>This is the folder structure: </p>
  
  <p><a href="https://i.stack.imgur.com/gWd0v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gWd0v.png" alt="enter image description here"></a></p>
  
  <p>This is the content of <code>CMServiceProvider.php</code>:</p>
  
  <pre><code>&lt;?php
  
  namespace Memberportal\CongressesModels;
  
  use Illuminate\Support\ServiceProvider;
  
  class CMServiceProvider extends ServiceProvider
  {
      /**
       * Register services.
       *
       * @return void
       */
      public function register()
      {
      }
  
      /**
       * Bootstrap services.
       *
       * @return void
       */
      public function boot()
      {
          $this-&gt;loadMigrationsFrom(__DIR__ . '/../database/migrations');
      }
  }
  </code></pre>