title: Problems installing dependencies by Composer
body: <p>When I generate the command "php composer.phar install" I get the following error:</p>
  
  <blockquote>
    <p>{"error":{"type":"PDOException","message":"SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'database'","file":"/var/www/wingtech/wingadmin/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php","line":47}}Script php artisan optimize handling the post-install-cmd event returned with an error</p>
  </blockquote>
  
  <p><a href="http://oi42.tinypic.com/20uc2ma.jpg" rel="nofollow">http://oi42.tinypic.com/20uc2ma.jpg</a></p>
  
  <p>Curiously, when I set up a database in app/config/database.php before running the install of the composer this error does not appear</p>
  
  <p>To ease my php version is 5.4.17</p>
  
  <p>And my composer.json is:</p>
  
  <pre><code>{
  "name": "laravel/laravel",
  "description": "The Laravel Framework.",
  "keywords": ["framework", "laravel"],
  "license": "MIT",
  "require": {
      "laravel/framework": "4.0.*",
      "orchestra/asset": "2.0.*"
  },
  "autoload": {
      "classmap": [
          "app/commands",
          "app/controllers",
          "app/models",
          "app/library",
          "app/database/migrations",
          "app/database/seeds",
          "app/tests/TestCase.php"
      ]
  },
  "scripts": {
      "post-install-cmd": [
          "php artisan optimize"
      ],
      "pre-update-cmd": [
          "php artisan clear-compiled"
      ],
      "post-update-cmd": [
          "php artisan optimize"
      ],
      "post-create-project-cmd": [
          "php artisan key:generate"
      ]
  },
  "config": {
      "preferred-install": "dist"
  },
  "minimum-stability": "dev"
  }
  </code></pre>
  
  <p>Does anyone know what could be?</p>