The vendor class doesn't autoload I am trying to port the Infusionsoft module to Drupal 8 and I need to load the infusionsoft/php-sdk library.  I have been racking my brain all day trying to figure this out, but I cannot get the class to autoload.  I do not know if this is because it is a custom module and not hosted on drupal.org yet or what.

I have added the requirement to a composer.json file in the module:

{
  "require": {
    "infusionsoft/php-sdk": "dev-master",
  },
}


And told the root composer.json file to include the module's composer.json file:

{
  "extra": {
    "merge-plugin": {
      "include": [
        "core/composer.json",
        "modules/infusionsoft/composer.json"
      ],
      "recurse": true,
      "replace": false,
      "merge-extra": false
    },
  },
}


Ran

composer update


and also tried 

composer install


Both give me the vendor files.  I have uploaded those files to the remote server's vendor directory, yet they are still not being loaded. 

I have read several other posts on here and many other sites, but none of the answers are up-to-date with Drupal 8.5.2.  And the composer manager module method is depreciated.

I don't know if this is an issue with their sdk's structure or if I need to upload a another/different file(s) to the server, but instantiating the class breaks.

use Infusionsoft\Infusionsoft;
$infusionsoft = new Infusionsoft([
  'clientId'     =&gt; $id,
  'clientSecret' =&gt; $secret,
  'redirectUri'  =&gt; $redirect,
]);


Any help is greatly appreciated! Thanks!
Both give me the vendor files. I have uploaded those files to the remote server's vendor directory, yet they are still not being loaded. 


What files did you upload exactly? It's not enough to upload just the new files from your package, installing packages with composer also updates its own autoloading files to make sure it knows where to load that and you probably forgot to upload those, that's the only explanation I have at least.

Try uploading all the files in vendor/composer as well or to be sure, all the files in vendor.