Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to handle composer dev bundles in non-dev environments? #346

Closed
@inverse

Description

@inverse

I am trying to migrate an existing Symfony 4 application to flex and use the DoctrineMigrationBundle for both dev/test environments which is installed as a dev dependency.

which all looks good in my bundles.php:

    Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],

The problem comes when booting:

  PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DoctrineFixturesBundle" from namespace "Doctrine\Bundle\FixturesBundle".                  
  Did you forget a "use" statement for another namespace? in /var/www/kitaspot/releases/64/src/Kernel.php:33        

Since this is a dev dependency this is stripped out when deploying to production. What's advised in this situation? Aside including it as a normal dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions