Skip to content

Ambiguous class resolution due to autoloading migrations #30

@fnatte

Description

@fnatte

aa53d49#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780R39 added the migrations folder to the autoload in composer.json.

If the migrations are published as explained in the readme using

php artisan vendor:publish --provider="Efficiently\AuthorityController\AuthorityControllerServiceProvider" --tag="migrations"

then composer will contain multiple classmap entries for all migrations. This will result in warnings when running composer install:

Warning: Ambiguous class resolution, "CreateRolesTable" was found in both "$baseDir . '/database/migrations/2015_02_23_095033_create_roles_table.php" and "vendor/efficiently/authority-controller/src/migrations/2015_02_23_095033_create_roles_table.php", the first will be used.
Warning: Ambiguous class resolution, "CreateRoleUserTable" was found in both "$baseDir . '/database/migrations/2015_02_23_095152_create_role_user_table.php" and "vendor/efficiently/authority-controller/src/migrations/2015_02_23_095152_create_role_user_table.php", the first will be used.
Warning: Ambiguous class resolution, "CreatePermissionsTable" was found in both "$baseDir . '/database/migrations/2015_02_23_095107_create_permissions_table.php" and "vendor/efficiently/authority-controller/src/migrations/2015_02_23_095107_create_permissions_table.php", the first will be used.

Is there a reason the migrations folder was added to composer.json?

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