title: Composer hook to fix package version
body: <p>I need to hook in composer installation process to fix versions of second level dependencies of root package. I.e. my package depends on some packages (with correct versions) but these packages depends on other packages and its versions are "wrong". I try to use <strong>pre-package-install</strong> hook to patch such versions but it is not working for me, code inside Installer::prePackageInstall is not executed.</p>
  
  <p>Root package composer.json looks like this:</p>
  
  <pre><code>{
      "name": "***/root-package",
  
      "repositories": [ { "type": "composer", "url": "http://***/packages.json" } ],
  
      "require": {
          "***/first-level-dep-1": "dev-release-XX",
          "***/first-level-dep-2": "dev-release-XX"
      },
  
      "scripts": {
          "pre-package-install": [
              "root-package\\Installer::prePackageInstall"
          ]
      }
  }
  </code></pre>
  
  <p>First level dependency composer.json looks like this:</p>
  
  <pre><code>{
      "name": "***/first-level-dep-1",
  
      "repositories": [ { "type": "composer", "url": "http://***/packages.json" } ],
  
      "require": {
          "***/second-level-dep-1": "*",  // !!! here is my problem
          "***/second-level-dep-2": "*"
      }
  }
  </code></pre>
  
  <p>I need to replace <strong>*</strong> to appropriate version during installation process.</p>