Skip to content

Doctrine Migrations set up violates PSR-4 #343

Closed
@dbu

Description

@dbu

In a new flex project, i added migrations and generated a migration. The dir_name is set to src/Migrations, but the migrations are created with namespace DoctrineMigrations. The code style fixer wants to change that to App\Migrations. The migrate command finds the migration file, but then tries to instantiate the class with the DoctrineMigrations namespace. The migration is also not runtime code but more of a configuration thing. I changed the configuration to place the migration in config/Migrations (without setting up autoloading) to make things work.

I am not sure what the best solution is, but placing migrations in src/ but with a totally wrong namespace (no App prefix, folder Migrations vs namespace DoctrineMigrations) is counter-intuitive and leading to confusion.

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