-
Notifications
You must be signed in to change notification settings - Fork 350
Feature/command improvements #698
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
Conversation
- Show error message instead and exit with status 1
- Handle case where requested role does not exist - Handle case where username already exists
@@ -43,13 +43,25 @@ protected function execute(InputInterface $input, OutputInterface $output) | |||
{ | |||
$doctrine = $this->getContainer()->get('doctrine'); | |||
$em = $doctrine->getManager(); | |||
$now = new \Datetime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled by Doctrine event hooks.
7810b43
to
77decd9
Compare
foreach ($query->getArrayResult() as $roleEntity) { | ||
$roles[] = $roleEntity['name']; | ||
} | ||
$roleNames = $this->getRoleNames(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to repository.
77decd9
to
5dd2156
Compare
@@ -28,5 +28,10 @@ | |||
</join-columns> | |||
</many-to-one> | |||
|
|||
<lifecycle-callbacks> | |||
<lifecycle-callback type="prePersist" method="beforeSave" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dantleech why call the method like event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateTimestamps
5dd2156
to
7d4d681
Compare
Feature/command improvements
This PR contains 3 commits which fix some issues in the user/role commands
preUpdate
andprePersist
hooks to set the created + changed fields on theRole
entity.Tasks:
Informations: