Skip to content
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

BlockFixtureFactory should not use ChannelContext #418

Open
Prometee opened this issue Jan 27, 2022 · 1 comment
Open

BlockFixtureFactory should not use ChannelContext #418

Prometee opened this issue Jan 27, 2022 · 1 comment

Comments

@Prometee
Copy link
Contributor

Fixture are usually used during a command and is considered stateless.
ChannelContext is supposed to be stateful : Sylius/Sylius#9987 (comment)

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 ?

@codebach
Copy link

codebach commented Sep 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants