SyliusCmsPlugin
SyliusCmsPlugin copied to clipboard
`BlockFixtureFactory` should not use `ChannelContext`
Fixture are usually used during a command and is considered stateless. ChannelContext is supposed to be stateful : https://github.com/Sylius/Sylius/issues/9987#issuecomment-1022977043
A Block has a product_codes and a channels nodes, if a product need to be found within a channel, then iterate through channels values to retrieve Products is a solution to avoid using the ChannelContext. If no channels is given then retrieve the Products without the Channel filter.
What do you think about that ?
When you disable {_locale} from the url, block fixture explodes!
https://docs.sylius.com/en/1.12/cookbook/shop/disabling-localised-urls.html
Running fixture "block"...
In RequestStack.php line 126:
There is currently no session available.
sylius:fixtures:load [<suite>]