Symfony 4, flash messages from repository or somewhere else?
My situation is this, I want to delete a user record from the database. This is simple enough to do. but there are 2 possible outcomes.
- The user is deleted
- The user has been referenced by a FK and the delete will fail, so, the user is marked disabled. (active/enabled = false)
My thoughts are that this action taken against the Users
entity should be in the UsersRepository
so that is where my method deleteUser($user)
is. $user
being the user object automatically queried via ParamConverter and passed to the repository method.
Because the work is done in the repository, that is where it makes sense to me to provide feedback from.
How do I addFlash()
from my AppRepositoryUsersRepository extends ServiceEntityRepository
? or should I do this "work" elsewhere?
symfony symfony4
add a comment |
My situation is this, I want to delete a user record from the database. This is simple enough to do. but there are 2 possible outcomes.
- The user is deleted
- The user has been referenced by a FK and the delete will fail, so, the user is marked disabled. (active/enabled = false)
My thoughts are that this action taken against the Users
entity should be in the UsersRepository
so that is where my method deleteUser($user)
is. $user
being the user object automatically queried via ParamConverter and passed to the repository method.
Because the work is done in the repository, that is where it makes sense to me to provide feedback from.
How do I addFlash()
from my AppRepositoryUsersRepository extends ServiceEntityRepository
? or should I do this "work" elsewhere?
symfony symfony4
thanks for the down vote && constructive feedback
– Chad
Nov 23 '18 at 20:03
add a comment |
My situation is this, I want to delete a user record from the database. This is simple enough to do. but there are 2 possible outcomes.
- The user is deleted
- The user has been referenced by a FK and the delete will fail, so, the user is marked disabled. (active/enabled = false)
My thoughts are that this action taken against the Users
entity should be in the UsersRepository
so that is where my method deleteUser($user)
is. $user
being the user object automatically queried via ParamConverter and passed to the repository method.
Because the work is done in the repository, that is where it makes sense to me to provide feedback from.
How do I addFlash()
from my AppRepositoryUsersRepository extends ServiceEntityRepository
? or should I do this "work" elsewhere?
symfony symfony4
My situation is this, I want to delete a user record from the database. This is simple enough to do. but there are 2 possible outcomes.
- The user is deleted
- The user has been referenced by a FK and the delete will fail, so, the user is marked disabled. (active/enabled = false)
My thoughts are that this action taken against the Users
entity should be in the UsersRepository
so that is where my method deleteUser($user)
is. $user
being the user object automatically queried via ParamConverter and passed to the repository method.
Because the work is done in the repository, that is where it makes sense to me to provide feedback from.
How do I addFlash()
from my AppRepositoryUsersRepository extends ServiceEntityRepository
? or should I do this "work" elsewhere?
symfony symfony4
symfony symfony4
edited Nov 26 '18 at 13:49
Chad
asked Nov 23 '18 at 16:41
ChadChad
360516
360516
thanks for the down vote && constructive feedback
– Chad
Nov 23 '18 at 20:03
add a comment |
thanks for the down vote && constructive feedback
– Chad
Nov 23 '18 at 20:03
thanks for the down vote && constructive feedback
– Chad
Nov 23 '18 at 20:03
thanks for the down vote && constructive feedback
– Chad
Nov 23 '18 at 20:03
add a comment |
2 Answers
2
active
oldest
votes
You should add flash message from the controller as shown in official doc :
https://symfony.com/doc/current/controller.html
Also, if you are new to Symfony, you may want to take a look at how services work cause it's where a lot of your work and methods are gonna end up. if you use Doctrine an action to delete a user in a controller should looks like this:
MyAction(User $user){
$em = $this->getDoctrine()->getManager();
$em->remove($user);
$em->flush();
$this->addFlash(
'notice',
'Your user is now deleted!'
);
return $this->redirectToRoute('some_other_route');
}
That's a bit 'out of the box' and can of course be improved but you get the idea ... my advise is, get through some official doc, it's qui te easy to get launched :) eventually try to go through Knp symfony4 first courses it's 2-3 hours long and quite useful
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
add a comment |
I found the FlashBagInterface
via console bin/console debug:autowiring
So normal dependency injection of SymfonyComponentHttpFoundationSessionFlashFlashBagInterface
and you can $this->FlashBagInterface->add()
simple.
for completeness of answer, here is the code;
src/Repository/UsersRepository.php (most code stripped out for compactness)
<?php
namespace AppRepository;
// use ...
use DoctrineDBALExceptionForeignKeyConstraintViolationException;
use SymfonyComponentHttpFoundationSessionFlashFlashBagInterface;
// ...
class UsersRepository extends ServiceEntityRepository
{
private $security;
private $request;
private $flash;
public function __construct(RegistryInterface $registry, Security $security, RequestStack $request, FlashBagInterface $flash)
{
parent::__construct($registry, Users::class);
$this->security = $security;
$this->request = $request;
$this->flash = $flash;
}
// ...
/**
* deleteUser
*
* @param Users $user
* @return void
*/
public function deleteUser($user)
{
$em = $this->getEntityManager();
$user->setEnabled(false);
$em->flush();
try {
$em->remove($user);
$em->flush();
$this->flash->add('notice', 'user.manager.user.deleted');
} catch (ForeignKeyConstraintViolationException $e) {
$this->flash->add('notice', 'user.manager.user.can.not.delete.disabled');
}
}
}
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interfaceDeletesUserService
, an implementationDoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.
– emix
Nov 26 '18 at 14:04
okay, I will read up on SRP - Maybe I'll put the method into myUserManagerController.php
where currentlydelete()
just calls$repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450298%2fsymfony-4-flash-messages-from-repository-or-somewhere-else%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should add flash message from the controller as shown in official doc :
https://symfony.com/doc/current/controller.html
Also, if you are new to Symfony, you may want to take a look at how services work cause it's where a lot of your work and methods are gonna end up. if you use Doctrine an action to delete a user in a controller should looks like this:
MyAction(User $user){
$em = $this->getDoctrine()->getManager();
$em->remove($user);
$em->flush();
$this->addFlash(
'notice',
'Your user is now deleted!'
);
return $this->redirectToRoute('some_other_route');
}
That's a bit 'out of the box' and can of course be improved but you get the idea ... my advise is, get through some official doc, it's qui te easy to get launched :) eventually try to go through Knp symfony4 first courses it's 2-3 hours long and quite useful
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
add a comment |
You should add flash message from the controller as shown in official doc :
https://symfony.com/doc/current/controller.html
Also, if you are new to Symfony, you may want to take a look at how services work cause it's where a lot of your work and methods are gonna end up. if you use Doctrine an action to delete a user in a controller should looks like this:
MyAction(User $user){
$em = $this->getDoctrine()->getManager();
$em->remove($user);
$em->flush();
$this->addFlash(
'notice',
'Your user is now deleted!'
);
return $this->redirectToRoute('some_other_route');
}
That's a bit 'out of the box' and can of course be improved but you get the idea ... my advise is, get through some official doc, it's qui te easy to get launched :) eventually try to go through Knp symfony4 first courses it's 2-3 hours long and quite useful
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
add a comment |
You should add flash message from the controller as shown in official doc :
https://symfony.com/doc/current/controller.html
Also, if you are new to Symfony, you may want to take a look at how services work cause it's where a lot of your work and methods are gonna end up. if you use Doctrine an action to delete a user in a controller should looks like this:
MyAction(User $user){
$em = $this->getDoctrine()->getManager();
$em->remove($user);
$em->flush();
$this->addFlash(
'notice',
'Your user is now deleted!'
);
return $this->redirectToRoute('some_other_route');
}
That's a bit 'out of the box' and can of course be improved but you get the idea ... my advise is, get through some official doc, it's qui te easy to get launched :) eventually try to go through Knp symfony4 first courses it's 2-3 hours long and quite useful
You should add flash message from the controller as shown in official doc :
https://symfony.com/doc/current/controller.html
Also, if you are new to Symfony, you may want to take a look at how services work cause it's where a lot of your work and methods are gonna end up. if you use Doctrine an action to delete a user in a controller should looks like this:
MyAction(User $user){
$em = $this->getDoctrine()->getManager();
$em->remove($user);
$em->flush();
$this->addFlash(
'notice',
'Your user is now deleted!'
);
return $this->redirectToRoute('some_other_route');
}
That's a bit 'out of the box' and can of course be improved but you get the idea ... my advise is, get through some official doc, it's qui te easy to get launched :) eventually try to go through Knp symfony4 first courses it's 2-3 hours long and quite useful
answered Nov 23 '18 at 18:51
Yoann MirYoann Mir
1115
1115
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
add a comment |
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
a Repository class is made a service (it is not excluded like Entity)
– Chad
Nov 23 '18 at 20:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
unless you have different business logic depending on wich entity you want to delete, i don't see the point of creating a delete method in each repository class when you can access entity manager from controller
– Yoann Mir
Nov 24 '18 at 12:02
add a comment |
I found the FlashBagInterface
via console bin/console debug:autowiring
So normal dependency injection of SymfonyComponentHttpFoundationSessionFlashFlashBagInterface
and you can $this->FlashBagInterface->add()
simple.
for completeness of answer, here is the code;
src/Repository/UsersRepository.php (most code stripped out for compactness)
<?php
namespace AppRepository;
// use ...
use DoctrineDBALExceptionForeignKeyConstraintViolationException;
use SymfonyComponentHttpFoundationSessionFlashFlashBagInterface;
// ...
class UsersRepository extends ServiceEntityRepository
{
private $security;
private $request;
private $flash;
public function __construct(RegistryInterface $registry, Security $security, RequestStack $request, FlashBagInterface $flash)
{
parent::__construct($registry, Users::class);
$this->security = $security;
$this->request = $request;
$this->flash = $flash;
}
// ...
/**
* deleteUser
*
* @param Users $user
* @return void
*/
public function deleteUser($user)
{
$em = $this->getEntityManager();
$user->setEnabled(false);
$em->flush();
try {
$em->remove($user);
$em->flush();
$this->flash->add('notice', 'user.manager.user.deleted');
} catch (ForeignKeyConstraintViolationException $e) {
$this->flash->add('notice', 'user.manager.user.can.not.delete.disabled');
}
}
}
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interfaceDeletesUserService
, an implementationDoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.
– emix
Nov 26 '18 at 14:04
okay, I will read up on SRP - Maybe I'll put the method into myUserManagerController.php
where currentlydelete()
just calls$repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
|
show 1 more comment
I found the FlashBagInterface
via console bin/console debug:autowiring
So normal dependency injection of SymfonyComponentHttpFoundationSessionFlashFlashBagInterface
and you can $this->FlashBagInterface->add()
simple.
for completeness of answer, here is the code;
src/Repository/UsersRepository.php (most code stripped out for compactness)
<?php
namespace AppRepository;
// use ...
use DoctrineDBALExceptionForeignKeyConstraintViolationException;
use SymfonyComponentHttpFoundationSessionFlashFlashBagInterface;
// ...
class UsersRepository extends ServiceEntityRepository
{
private $security;
private $request;
private $flash;
public function __construct(RegistryInterface $registry, Security $security, RequestStack $request, FlashBagInterface $flash)
{
parent::__construct($registry, Users::class);
$this->security = $security;
$this->request = $request;
$this->flash = $flash;
}
// ...
/**
* deleteUser
*
* @param Users $user
* @return void
*/
public function deleteUser($user)
{
$em = $this->getEntityManager();
$user->setEnabled(false);
$em->flush();
try {
$em->remove($user);
$em->flush();
$this->flash->add('notice', 'user.manager.user.deleted');
} catch (ForeignKeyConstraintViolationException $e) {
$this->flash->add('notice', 'user.manager.user.can.not.delete.disabled');
}
}
}
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interfaceDeletesUserService
, an implementationDoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.
– emix
Nov 26 '18 at 14:04
okay, I will read up on SRP - Maybe I'll put the method into myUserManagerController.php
where currentlydelete()
just calls$repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
|
show 1 more comment
I found the FlashBagInterface
via console bin/console debug:autowiring
So normal dependency injection of SymfonyComponentHttpFoundationSessionFlashFlashBagInterface
and you can $this->FlashBagInterface->add()
simple.
for completeness of answer, here is the code;
src/Repository/UsersRepository.php (most code stripped out for compactness)
<?php
namespace AppRepository;
// use ...
use DoctrineDBALExceptionForeignKeyConstraintViolationException;
use SymfonyComponentHttpFoundationSessionFlashFlashBagInterface;
// ...
class UsersRepository extends ServiceEntityRepository
{
private $security;
private $request;
private $flash;
public function __construct(RegistryInterface $registry, Security $security, RequestStack $request, FlashBagInterface $flash)
{
parent::__construct($registry, Users::class);
$this->security = $security;
$this->request = $request;
$this->flash = $flash;
}
// ...
/**
* deleteUser
*
* @param Users $user
* @return void
*/
public function deleteUser($user)
{
$em = $this->getEntityManager();
$user->setEnabled(false);
$em->flush();
try {
$em->remove($user);
$em->flush();
$this->flash->add('notice', 'user.manager.user.deleted');
} catch (ForeignKeyConstraintViolationException $e) {
$this->flash->add('notice', 'user.manager.user.can.not.delete.disabled');
}
}
}
I found the FlashBagInterface
via console bin/console debug:autowiring
So normal dependency injection of SymfonyComponentHttpFoundationSessionFlashFlashBagInterface
and you can $this->FlashBagInterface->add()
simple.
for completeness of answer, here is the code;
src/Repository/UsersRepository.php (most code stripped out for compactness)
<?php
namespace AppRepository;
// use ...
use DoctrineDBALExceptionForeignKeyConstraintViolationException;
use SymfonyComponentHttpFoundationSessionFlashFlashBagInterface;
// ...
class UsersRepository extends ServiceEntityRepository
{
private $security;
private $request;
private $flash;
public function __construct(RegistryInterface $registry, Security $security, RequestStack $request, FlashBagInterface $flash)
{
parent::__construct($registry, Users::class);
$this->security = $security;
$this->request = $request;
$this->flash = $flash;
}
// ...
/**
* deleteUser
*
* @param Users $user
* @return void
*/
public function deleteUser($user)
{
$em = $this->getEntityManager();
$user->setEnabled(false);
$em->flush();
try {
$em->remove($user);
$em->flush();
$this->flash->add('notice', 'user.manager.user.deleted');
} catch (ForeignKeyConstraintViolationException $e) {
$this->flash->add('notice', 'user.manager.user.can.not.delete.disabled');
}
}
}
edited Nov 26 '18 at 13:58
answered Nov 23 '18 at 18:31
ChadChad
360516
360516
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interfaceDeletesUserService
, an implementationDoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.
– emix
Nov 26 '18 at 14:04
okay, I will read up on SRP - Maybe I'll put the method into myUserManagerController.php
where currentlydelete()
just calls$repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
|
show 1 more comment
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interfaceDeletesUserService
, an implementationDoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.
– emix
Nov 26 '18 at 14:04
okay, I will read up on SRP - Maybe I'll put the method into myUserManagerController.php
where currentlydelete()
just calls$repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
This is the weirdest solution I've ever seen, you should not use any flashes inside repositories.
– emix
Nov 26 '18 at 14:01
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
why? The work is being done here, so this is where the results 'A' or 'B' are determined. Hense reporting the outcome.
– Chad
Nov 26 '18 at 14:03
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interface
DeletesUserService
, an implementation DoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.– emix
Nov 26 '18 at 14:04
SRP violation. Repository acts upon data and should not care about details like that. If you really have such requirement, create an interface
DeletesUserService
, an implementation DoctrineFlashUserDeleteService
and inject the flash messenger and the doctrine there. Make your application depend upon the interface. This is called proper OOP, proper responsibility segregation. Injecting session into repository is plain wrong.– emix
Nov 26 '18 at 14:04
okay, I will read up on SRP - Maybe I'll put the method into my
UserManagerController.php
where currently delete()
just calls $repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
okay, I will read up on SRP - Maybe I'll put the method into my
UserManagerController.php
where currently delete()
just calls $repository->deleteUser($user);
– Chad
Nov 26 '18 at 14:10
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
one more question if I may, What is the Responsibility of the entity Repository? (I thought it was to manipulate the entity) and thanks for the help thus far
– Chad
Nov 26 '18 at 14:15
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450298%2fsymfony-4-flash-messages-from-repository-or-somewhere-else%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
thanks for the down vote && constructive feedback
– Chad
Nov 23 '18 at 20:03