Symfony 4, flash messages from repository or somewhere else?












-2















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.




  1. The user is deleted

  2. 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?










share|improve this question

























  • thanks for the down vote && constructive feedback

    – Chad
    Nov 23 '18 at 20:03
















-2















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.




  1. The user is deleted

  2. 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?










share|improve this question

























  • thanks for the down vote && constructive feedback

    – Chad
    Nov 23 '18 at 20:03














-2












-2








-2








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.




  1. The user is deleted

  2. 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?










share|improve this question
















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.




  1. The user is deleted

  2. 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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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



















  • 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












2 Answers
2






active

oldest

votes


















2














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






share|improve this answer
























  • 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



















-1














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');
}
}
}





share|improve this answer


























  • 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 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











  • 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











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
});


}
});














draft saved

draft discarded


















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









2














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






share|improve this answer
























  • 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
















2














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






share|improve this answer
























  • 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














2












2








2







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






share|improve this answer













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







share|improve this answer












share|improve this answer



share|improve this answer










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



















  • 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













-1














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');
}
}
}





share|improve this answer


























  • 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 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











  • 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
















-1














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');
}
}
}





share|improve this answer


























  • 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 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











  • 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














-1












-1








-1







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');
}
}
}





share|improve this answer















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');
}
}
}






share|improve this answer














share|improve this answer



share|improve this answer








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 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











  • 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













  • 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













  • 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

















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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python