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

[Behat] Rework default channel factories #4138

Merged

Conversation

Zales0123
Copy link
Member

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets #4082
License MIT
Doc PR

According to mentioned issue, there are now two default channel factories:

  • DefaultChannelFactory creating only empty Default channel
  • DefaultFranceChannelFactory creating France channel, with EUR as default currency, France shipping country and proper zone with zone member

@@ -9,8 +9,9 @@ default:
entityManager: "@doctrine.orm.entity_manager"

- Sylius\Behat\Context\Setup\ChannelContext:
defaultFranceChannelFactory: "@sylius.behat.factory.default_france_channel"
defaultChannelFactory: "@sylius.behat.factory.default_channel"
sharedStorage: "@sylius.behat.shared_storage"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some context uses SharedStorage, can we pass it as the first argument?

@pamil
Copy link
Contributor

pamil commented Feb 12, 2016

As you're messing with channel factories, I have a dream... that DefaultFranceChannelFactory returns ChannelInterface instance, contexts using the factory set the shared storage variables by using some getters on returned channel and SharedStorage::setClipboard() is removed :)

@michalmarcinkowski michalmarcinkowski added the DX Issues and PRs aimed at improving Developer eXperience. label Feb 13, 2016
@Zales0123 Zales0123 force-pushed the differentiate-default-channel-factories branch 2 times, most recently from b5b57e8 to 7ccd0e5 Compare February 15, 2016 09:06
@Zales0123
Copy link
Member Author

Sure, setClipboard() is pretty lame, as it persuade factory to return array (in spite of being called e.g. "DefaultChannelFactory"). I think it should be deeply considered and reworked in the nearest future. For now, we can do that, as not all objects returned by DefaultFranceChannelFactory is property of channel (zone, for example) ;/

@Zales0123 Zales0123 force-pushed the differentiate-default-channel-factories branch from 7ccd0e5 to a96636c Compare February 15, 2016 14:28
@Zales0123 Zales0123 force-pushed the differentiate-default-channel-factories branch from a96636c to b8c48f0 Compare February 16, 2016 09:21
@Zales0123 Zales0123 force-pushed the differentiate-default-channel-factories branch from b8c48f0 to 88682cb Compare February 16, 2016 10:50
pjedrzejewski pushed a commit that referenced this pull request Feb 16, 2016
…-factories

[Behat] Rework default channel factories
@pjedrzejewski pjedrzejewski merged commit 9052469 into Sylius:master Feb 16, 2016
@pjedrzejewski
Copy link
Member

Thank you Mateusz!

@Zales0123 Zales0123 deleted the differentiate-default-channel-factories branch October 28, 2016 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Issues and PRs aimed at improving Developer eXperience.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants