Sylius: \Sylius\Bundle\ResourceBundle\Controller\ControllerTrait::addFlash throw error on Sylius 1.12

Sylius version affected: 1.12.x

Description
This trait is trowing error since the “session” service has been removed from Symfony. It should be migrated to RequestStack->getSession().

Steps to reproduce Create a controller that use \Sylius\Bundle\ResourceBundle\Controller\ControllerTrait and call short method addFlash

Possible Solution
Posted above

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Hi @Geolim4,

I know I’m pretty late to the party, but I can inform you the fix has just been released in 1.10.3 of ResourceBundle which also includes support for Symfony 6.4

The issue should be resolved so I’m closing this, if it persists ping me, and I’ll reopen and we’ll work on a fix.

Cheers 🍻

Ahh yes indeed, that bug appears only since Symfony 5.4/6+ so it’s a bit annoying yes because I’m forced to override this trait while the Symfony one is already patched. So yes a release would be much appreciated sir 😊

I cannot release myself, but I’ve reported that on the Sylius core team.