Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite Loop because 'vendor' does not exist #16

Open
davidfaber opened this issue May 26, 2023 · 0 comments
Open

Infinite Loop because 'vendor' does not exist #16

davidfaber opened this issue May 26, 2023 · 0 comments

Comments

@davidfaber
Copy link

In Migrator.php on line 127 you run a loop with the following condition:

basename( $base_path ) != 'vendor'

The name of the vendor-directory is configurable in the composer.json. If that is configured there, this while-loop runs infinitely. Might it not be better to simply use WP_CONTENT_DIR instead?

The function should (in my opinion) look like this:

protected function get_migrations_path() {
    return apply_filters( 'dbi_wp_migrations_path', WP_CONTENT_DIR . '/migrations' );
}

This way it's getting the correct migrations-path correctly, independent of the project-structure.

Thanks in advance,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant