wp-migrations
wp-migrations copied to clipboard
Infinite Loop because 'vendor' does not exist
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