title: request.CRITICAL: Uncaught PHP Exception Compile Error: Cannot declare class
body: <p>I use the following two classes with the same name.</p>
  
  <p>/src/AppBundle/Qrcode.php</p>
  
  <pre><code>namespace AppBundle\Qrcode;
  
  use Endroid\QrCode\QrCode;
  
  class Qrcode
  {
  </code></pre>
  
  <p>And</p>
  
  <p>/vendor/Endroid/.../Qrcode.php</p>
  
  <pre><code>namespace Endroid\QrCode;
  
  use Endroid\QrCode\Exceptions\DataDoesntExistsException;
  use Endroid\QrCode\Exceptions\VersionTooLargeException;
  use Endroid\QrCode\Exceptions\ImageSizeTooLargeException;
  use Endroid\QrCode\Exceptions\ImageFunctionUnknownException;
  use ReflectionFunction;
  
  class QrCode
  {
  </code></pre>
  
  <p>on the dev it works well but not on the prod one as I receive the following error message:</p>
  
  <blockquote>
    <p>request.CRITICAL: Uncaught PHP Exception
        Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error:
        Cannot declare class AppBundle\Qrcode because the name is
        already in use" at .../src/AppBundle/Qrcode.php line 8.</p>
  </blockquote>
  
  <p>I don't understand why it doesn't work. The namespaces are different and
  It works on the dev part...
  Thanks</p>