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

feat (MULTIPLE-MIGRATION-PATHS) #90: extend functionality to add real support for multiple migration paths #92

Merged
merged 2 commits into from
Oct 22, 2021

Conversation

renepardon
Copy link
Contributor

Pull request for discussion #90

Copy link
Member

@rubenvanassche rubenvanassche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small remarks, but looks like a good PR!

README.md Outdated Show resolved Hide resolved
config/settings.php Outdated Show resolved Hide resolved
src/Console/MakeSettingsMigrationCommand.php Show resolved Hide resolved
@@ -64,7 +64,7 @@ public function register(): void

private function removeMigrationsWhenSchemaLoaded(SchemaLoaded $event)
{
$migrations = collect(app(Filesystem::class)->files(config('settings.migrations_path')))
$migrations = collect(app(Filesystem::class)->files(config('settings.migrations_paths')))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're providing an array to a string only function, this isn't going to work. Could you wrap this in another loop with the same feedback to the previous config key as before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is not true. The phpDoc of Filesystem::files says it's string, but there is no type hint. The "$directory" is then passed to the Finder::in method which accepts "string|string[]" and casts the passed "$dirs" variable to an array. Therefore I would not change that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to hear!

…d real support for multiple migration paths
@rubenvanassche rubenvanassche merged commit ca3daea into spatie:master Oct 22, 2021
@rubenvanassche
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants