Skip to content

Refactor complex LoginController logic into a login chain of responsibility - #15365

Merged
MorrisJobke merged 1 commit into
masterfrom
refactor/login-chain
May 7, 2019
Merged

Refactor complex LoginController logic into a login chain of responsibility#15365
MorrisJobke merged 1 commit into
masterfrom
refactor/login-chain

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

This method has been on my list of code to refactor for a long time. As I now have to touch it for https://github.com/orgs/nextcloud/projects/29, I decided to break the code into smaller, maintainable and testable chunks. The code now follows a more strict single responsibility principle, while implementing the chain of responsibility pattern.

@ChristophWurstChristophWurst added 2. developing Work in progress technical debt 🧱 🤔🚀 labels May 3, 2019
@ChristophWurstChristophWurst added this to the Nextcloud 17 milestone May 3, 2019
@ChristophWurstChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 6, 2019
@ChristophWurst
ChristophWurst marked this pull request as ready for review May 6, 2019 11:53
@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

From what I can tell CI failures do not look related. But tell me if I'm wrong.

@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

Redis::connect(): connect() failed: Connection refused

-> restarted

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is just great. So much cleaner. And tests 🚀

I didn't test in debt but most stuff didn't blow up with my smoke testing.

}

public function testNotTwoFactorAuthenticated() {
$this->fail('todo');

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

guess what … CI fails for a reason

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NO WAY!

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobkeMorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 7, 2019
@MorrisJobke
MorrisJobke merged commit a6a8f85 into masterMay 7, 2019
@MorrisJobke
MorrisJobke deleted the refactor/login-chain branch May 7, 2019 20:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishtechnical debt🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ChristophWurst@rullzer@MorrisJobke