title: Copy files from package to project root directory using composer
body: <p>I'm writing a package for Packagist and I'm facing a problem with Composer. I need to copy a file from my package to the project root after install, but nothing is happening after the package installation.</p>
  
  <p>After reading Composer documentation, I found that I should put a script inside the event post-install-cmd, inside the script section into composer.json file.</p>
  
  <p>So, I added this to my package composer.json file</p>
  
  <pre><code>    "scripts": {
          "post-install-cmd": [
              "php -r \"copy('vendor/myvendor/mypackage/myfile', 'myfile');\""
          ]
      }
  </code></pre>
  
  <p>To install the package I'm doing</p>
  
  <pre><code>$ composer require myvendor/mypackage --dev
  </code></pre>
  
  <p>After the package installation everything seems fine, but the file is not being copied and no error is shown.</p>