title: Symfony fzaninotto/faker, Error: Class 'Faker\Factory' not found
body: <p>I'm working with Symfony, and the library fzaninotto/faker</p>
  
  <p>I'm using this library to test some stuff, but when running phpunit I have this error:</p>
  
  <blockquote>
    <p>Error: Class 'Faker\Factory' not found</p>
  </blockquote>
  
  <p>As usual I'm using the right <code>use Faker\Factory;</code></p>
  
  <p>As you can see is required only in my dev and I installed it running <code>composer install</code> </p>
  
  <p><strong>composer.json</strong> </p>
  
  <pre><code>{
  "type": "project",
  "license": "proprietary",
  "require": {
      "php": "^7.1.3",
      ...
      "symfony/framework-bundle": "4.1.*",
  },
  "require-dev": {
      "fzaninotto/faker": "^1.8",
      "symfony/dotenv": "4.1.*",
      "symfony/test-pack": "^1.0"
  },
  "config": {
      "preferred-install": {
          "*": "dist"
      },
      "sort-packages": true
  },
  "autoload": {
      "psr-4": {
          "App\\": "src/"
      }
  },
  "autoload-dev": {
      "psr-4": {
          "App\\Tests\\": "tests/"
      }
  },
  "replace": {
      "paragonie/random_compat": "2.*",
      "symfony/polyfill-ctype": "*",
      "symfony/polyfill-iconv": "*",
      "symfony/polyfill-php71": "*",
      "symfony/polyfill-php70": "*",
      "symfony/polyfill-php56": "*"
  },
  "scripts": {
      "auto-scripts": {
          "cache:clear": "symfony-cmd",
          "assets:install %PUBLIC_DIR%": "symfony-cmd"
      },
      "post-install-cmd": [
          "@auto-scripts"
      ],
      "post-update-cmd": [
          "@auto-scripts"
      ]
  },
  "conflict": {
      "symfony/symfony": "*"
  },
  "extra": {
      "symfony": {
          "allow-contrib": false,
          "require": "4.1.*"
      }
  }
  </code></pre>
  
  <p>}</p>