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

Remove default value for all-or-nothing option to avoid triggering deprecation notice #1380

Closed
wants to merge 1 commit into from

Conversation

gaetan-petit
Copy link

Q A
Type bug
BC Break no
Fixed issues #1379

Summary

Since 3.7 all-or-nothing option triggers a deprecation notice but \Doctrine\Migrations\Tools\Console\Command\MigrateCommand::configure defines a default value to notprovided which triggers the notice.

@@ -388,8 +388,8 @@ public static function allOrNothing(): Generator
yield [true, ['--all-or-nothing' => 0], false];
yield [true, ['--all-or-nothing' => '0'], false];

yield [true, [], true];
yield [false, [], false];
yield [true, [], true, false];
Copy link
Author

Choose a reason for hiding this comment

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

I'm confused on why this test is failing. I should look into it later. Any guidance welcomed 😃

Copy link
Member

Choose a reason for hiding this comment

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

I faintly remember this notprovided is here for a reason. Can you look through the history of commits/PRs/issues to find it?

Copy link
Contributor

@agustingomes agustingomes Nov 30, 2023

Choose a reason for hiding this comment

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

@gaetan-petit I made an alternative PR with these test changes.

TL;DR as part of the deprecation mechanism, I overlooked checking that the deprecation was not thrown. I adjusted the logic as well to achieve the desired result. Please give a review and point out if there's any flaw in the logic changes.

cc @greg0ire feel free to merge my alternative PR if it's ok for you.

Copy link
Author

Choose a reason for hiding this comment

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

@agustingomes indeed your pr is a better solution. I am closing this one.

@gaetan-petit
Copy link
Author

closing in favor of #1381

@gaetan-petit gaetan-petit deleted the patch-1 branch November 30, 2023 12:35
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.

3 participants