Skip to content

Class autoloading doesn't loads migration classes #56

Closed
@driesvints

Description

@driesvints

Autoloading was recently re-introduced to prevent us from having to run composer dump-autoload every time. See this commit.

But it seems this was only done for controllers and models. When I try to run a migration it still gives a Fatal error saying it didn't find the migration class:

PHP Fatal error:  Class 'CreateUsersTable' not found in foo/bar

Running composer dump-autoload fixes the problem.

I've tried adding the migrations folder to the array of folders here in app/start/global:

ClassLoader::register(new ClassLoader(array(

    app_path().'/controllers',
    app_path().'/models',
    app_path().'/database/migrations',

)));

Sadly that doesn't seems to be the solution.

Any suggestions...?

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