Skip to content

Migration classes do not comply with PSR-4 autoloading standard #1784

@kaktusas2598

Description

@kaktusas2598

Hello,

After trying to run composer update (v 1.10.1), it started to complain about every single migration class not complying with PSR-4 autoloading standard and telling me it won't be autoloaded once we switch to composer v2.0.

All our migration classes reside in root/database/src/Migration and fall under namespace Pi\Database\Migration. As far as I can see, problem here is that each migration php file must be prefixed with timestamp and this timestamp is not used in class name and this is why it complains about PSR-4 standard.

I think one solution is would be to add timestamps to class names, are there any other ways to workaround this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuremajorBC breaking / next major

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions