Skip to content

Support multiple migrations-directories #342

@marcusrettig

Description

@marcusrettig

Is your feature request related to a problem? Please describe.
The plugin only considers migrations in the database/migrations directory. If migrations are spread out in several directories, e.g. when using Laravel Modules, some Model stubs are generated without @property definitions. This results in many false positive UndefinedMagicPropertyAssignment errors.

Describe the solution you'd like
First, a warning message would be nice when a table can't be found (here).

Second, a way to specify multiple directories for migrations would be nice. I'm not sure what would be the best way to do this.

Describe alternatives you've considered
Temporarily moving all migrations into database/migrations before running Psalm fixes the issue, but it is rather inconvenient.

Additional context
Our directory structure looks like this:

database/
    migrations/
modules/
    MobuleA/
        database/
            migrations/
    MobuleB/
        database/
            migrations/

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions