Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] [Redis] Fix auth option wrongly considered invalid #42173

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

Merged
merged 1 commit into from
Jul 18, 2021

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Jul 18, 2021

Q A
Branch? 5.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Will also make the CI back to green on 5.2.

@chalasr chalasr requested a review from sroze as a code owner July 18, 2021 13:26
@carsonbot carsonbot added this to the 5.2 milestone Jul 18, 2021
@carsonbot carsonbot changed the title [Messenger][Redis] Fix auth option wrongly considered invalid [Messenger] [Redis] Fix auth option wrongly considered invalid Jul 18, 2021

Connection::fromDsn('redis://password:localhost/queue', [], $redis);
}

Copy link
Member Author

@chalasr chalasr Jul 18, 2021

Choose a reason for hiding this comment

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

This test was added in #42067 but it never passed, the dsn is invalid (https://github.com/symfony/symfony/runs/3097443193#step:11:102)

@chalasr chalasr force-pushed the flawed-tests branch 2 times, most recently from 27a3f5a to ccc5513 Compare July 18, 2021 14:46
/**
* @group legacy
* ^ for now, deprecation errors are thrown during serialization.
*/
Copy link
Member Author

@chalasr chalasr Jul 18, 2021

Choose a reason for hiding this comment

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

This test was broken because it uses an incomplete symfony serializer (see https://github.com/symfony/symfony/runs/3097443193#step:11:72)

@chalasr
Copy link
Member Author

chalasr commented Jul 18, 2021

Green 🎉

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you. Just a minor thing and a question. =)

@@ -225,6 +225,7 @@ private static function validateOptions(array $options): void
{
$availableOptions = array_keys(self::DEFAULT_OPTIONS);
$availableOptions[] = 'serializer';
$availableOptions[] = 'auth';
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because these options did not have a default and if they aren't added to the $avaibleOptions array, you get a deprecation notice (exception in 6.0).
It turns out that we can easily add ones, I did :)

Copy link
Member

Choose a reason for hiding this comment

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

You are correct. Thank you.

@chalasr chalasr force-pushed the flawed-tests branch 2 times, most recently from 5df784c to 95c5558 Compare July 18, 2021 16:46
Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Im happy when the CI is green

@chalasr
Copy link
Member Author

chalasr commented Jul 18, 2021

Thanks for the review.

@chalasr chalasr merged commit e7faee4 into symfony:5.2 Jul 18, 2021
@chalasr chalasr deleted the flawed-tests branch July 18, 2021 19:08
This was referenced Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants