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

[Customer] Refactor customer actions to use command providers #493

Merged
merged 1 commit into from
Jul 25, 2019

Conversation

GSadee
Copy link
Member

@GSadee GSadee commented Jul 25, 2019

No description provided.

@GSadee GSadee requested a review from a team as a code owner July 25, 2019 05:35
@GSadee GSadee force-pushed the command-providers-customer branch 3 times, most recently from c6b0d34 to 0816f5c Compare July 25, 2019 06:26
Copy link
Member

@lchrusciel lchrusciel left a comment

Choose a reason for hiding this comment

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

rebase needed

$this->bus->dispatch(new GenerateResetPasswordToken($request->request->get('email')));
$this->bus->dispatch(new SendResetPasswordToken($request->request->get('email'), $channel->getCode()));
$this->bus->dispatch($this->generateResetPasswordTokenCommandProvider->getCommand($request));
$this->bus->dispatch($this->sendResetPasswordTokenCommandProvider->getCommand($request, $channel));
Copy link
Member

Choose a reason for hiding this comment

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

We could also refactor this action to be based on events in next iteration

{
/** @var string */
protected $token;

public function __construct(Request $request)
private function __construct(Request $request)
Copy link
Member

Choose a reason for hiding this comment

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

Quick though. As these classes are meant to be extended, maybe we should define constructors as protected so that they will be usable from child classes.

@GSadee GSadee force-pushed the command-providers-customer branch 2 times, most recently from 3b1467c to dfe7ae2 Compare July 25, 2019 11:40
@GSadee GSadee force-pushed the command-providers-customer branch from dfe7ae2 to 242ed10 Compare July 25, 2019 11:50
@GSadee GSadee merged commit 911a1da into Sylius:master Jul 25, 2019
@GSadee GSadee deleted the command-providers-customer branch July 25, 2019 12:03
lchrusciel added a commit that referenced this pull request Jul 25, 2019
…ors (GSadee)

This PR was merged into the 1.0-dev branch.

Discussion
----------

Based on #496 

According to #493 (diff)

Commits
-------

df56a31 Change from private to protected for requests constructors
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.

2 participants