title: Calling Flysystem, why do I get PHP Fatal error: Class 'League\Flysystem\Adapter\Local' not found?
body: <p>I try to run Flysystem's basic example code for the <code>Local</code> adapter and get a <code>Class 'League\Flysystem\Adapter\Local' not found</code> error.  This is my process:</p>
  
  <p>version check: </p>
  
  <pre><code>php -v
  PHP 5.5.9-1ubuntu4.23 (cli) (built: Feb  8 2018 21:59:47)
  </code></pre>
  
  <p>install Flysystem:</p>
  
  <pre><code>composer require league/flysystem
  </code></pre>
  
  <p>output shows I'm up-to-date (this is my 2nd time running it):</p>
  
  <pre><code>Using version ^1.0 for league/flysystem
  ./composer.json has been updated
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Nothing to install or update
  Generating autoload files
  </code></pre>
  
  <p>now there's a <code>vendor</code> folder in web root.  And within <code>./web/vendor/league/flysystem/src/Adapter$</code> are these files:</p>
  
  <pre><code>AbstractAdapter.php
  AbstractFtpAdapter.php
  CanOverwriteFiles.php
  Ftpd.php
  Ftp.php
  Local.php
  NullAdapter.php
  Polyfill/
  SynologyFtp.php
  </code></pre>
  
  <p>...just showing that it seems to be installed correctly(?)  I create one test file and one test directory in my web root:</p>
  
  <ol>
  <li>fly-local.php</li>
  <li>myfiles/</li>
  </ol>
  
  <p>Into <code>fly-local.php</code> I paste the text from their docs (<a href="https://flysystem.thephpleague.com/docs/adapter/local/" rel="nofollow noreferrer">https://flysystem.thephpleague.com/docs/adapter/local/</a>): </p>
  
  <pre><code>&lt;?php
  
  use League\Flysystem\Filesystem;
  use League\Flysystem\Adapter\Local;
  
  $adapter = new League\Flysystem\Adapter\Local(__DIR__.'/myfiles');
  $filesystem = new Filesystem($adapter);
  </code></pre>
  
  <p>...and change the adapter's root folder to <code>myfiles</code> (is that correct?).  Then I run it:</p>
  
  <pre><code>php fly-local.php
  </code></pre>
  
  <p>It outputs:</p>
  
  <pre><code>PHP Fatal error:  Class 'League\Flysystem\Adapter\Local' not found in /[PROJECT DIR]/web/fly-local.php on line 6
  PHP Stack trace:
  PHP   1. {main}() /[PROJECT DIR]/web/fly-local.php:0
  </code></pre>
  
  <p>What am I doing wrong?</p>