title: How to fix error of composer post-install-cmd script?
body: <p>I would like to use composer script to do some post installation such as copying files from bootstrap vendor folder to my web application public folder.  I have a baby experience with PHP world and web application development.</p>
  
  <p>I'm trying to <em>learn</em> doing this by following <a href="http://www.sitepoint.com/build-automation-with-composer-scripts/" rel="noreferrer">this tutorial</a></p>
  
  <p><strong>This is my directory structure*</strong>
  <img src="https://i.stack.imgur.com/JMwI7.png" alt="enter image description here"></p>
  
  <p><strong>This is my composer.json</strong></p>
  
  <pre><code>{
      "name": "Composer Script",
      "description": "An example to demonstrate the use of Composer scripts",
      "version": "1.0.0",
      "require": {
          "twitter/bootstrap": "&gt;=3.0"
      },
  
      "scripts": {
          "post-install-cmd": [
              "ComposerScript\\Installer::postInstall"
          ],
          "post-package-install": [
              "/var/www/test/composer-script/install.sh"
          ]
      }
  }
  </code></pre>
  
  <p><strong>This is ComposerScript\Installer.php</strong></p>
  
  <pre><code>class Installer
  
      {
          public static function postInstall(Event $event)
          {
              $composer = $event-&gt;getComposer();
              // do stuff
          }
  
          public static function postPackageInstall(Event $event)
          {
              $installedPackage = $event-&gt;getOperation()-&gt;getPackage();
              // do stuff
          }
  
          public static function warmCache(Event $event)
          {
              // make cache toasty
          }
      }
  </code></pre>
  
  <p><strong>After execute <em>composer install</em> I got this error</strong>
  <img src="https://i.stack.imgur.com/DjNXO.png" alt="enter image description here"></p>
  
  <p><strong>install.sh is empty at this moment</strong></p>
  
  <p>How to fix this error, and especially <em>what is autoload</em>?, I don't event know what keywords to search for please suggest me some reading.</p>