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

Make it possible to have no shipping methods for Order fixtures #10489

Merged

Conversation

TiMESPLiNTER
Copy link
Contributor

@TiMESPLiNTER TiMESPLiNTER commented Jul 2, 2019

Currently it's not possible to have fixture suites with no shipping methods (a.k.a. virtual shipping only). This PR makes it possible.

Q A
Branch? 1.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets #10490
License MIT

@TiMESPLiNTER TiMESPLiNTER requested a review from a team as a code owner July 2, 2019 08:31
@TiMESPLiNTER TiMESPLiNTER changed the title Make it possible to have no shipping methods Make it possible to have no shipping methods for Order fixtures Jul 2, 2019
src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php Outdated Show resolved Hide resolved

for ($i = 0; $i < $numberOfItems; ++$i) {
/** @var OrderItemInterface $item */
$item = $this->orderItemFactory->createNew();

$product = $this->faker->randomElement($products);
$variant = $this->faker->randomElement($product->getVariants()->toArray());
$variant->setShippingRequired($shippingMethodsAvailable);
Copy link
Member

Choose a reason for hiding this comment

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

Later, we should improve these fixtures and allow for configuration from yaml file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I improve the issue description and we keep it open or should I create a new issue for making it configurable?

@lchrusciel
Copy link
Member

And welcome to our contributors :)

Co-Authored-By: Łukasz Chruściel <lchrusciel@gmail.com>
@Zales0123 Zales0123 added the Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). label Jul 2, 2019
@lchrusciel lchrusciel merged commit 608546b into Sylius:1.4 Jul 5, 2019
@lchrusciel
Copy link
Member

Thank you, Pascal! 🎉

GSadee added a commit that referenced this pull request Jul 9, 2019
…rder fixtures" (lchrusciel)

This PR was merged into the 1.4 branch.

Discussion
----------

Reverts #10489

Ref. 608546b#r34204877

Commits
-------

ed1f72f Revert "Make it possible to have no shipping methods for Order fixtures"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants