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
[FIX] Default variant #15548
[FIX] Default variant #15548
Conversation
src/Sylius/Bundle/ProductBundle/Doctrine/ORM/ProductVariantRepository.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Product/Repository/ProductVariantRepositoryInterface.php
Outdated
Show resolved
Hide resolved
Bunnyshell Preview Environment deletedAvailable commands:
|
So it was a regression. We need a test to prevent that from happening again. |
9661a16
to
4cb00eb
Compare
src/Sylius/Bundle/ProductBundle/Doctrine/ORM/ProductVariantRepository.php
Outdated
Show resolved
Hide resolved
4cb00eb
to
69463f0
Compare
69463f0
to
a48a8c8
Compare
@vvasiloi Scenario added 😉 |
features/product/viewing_products/viewing_product_price_on_products_list.feature
Outdated
Show resolved
Hide resolved
features/product/viewing_products/viewing_product_price_on_products_list.feature
Show resolved
Hide resolved
59290bc
to
d0fc9e2
Compare
Do I have to silent the PSALM error ? Any other way to circle around this error ? |
Maybe just use |
Or we remove psalm 😆 /cc @jakubtobiasz |
d0fc9e2
to
3d72280
Compare
src/Sylius/Component/Product/Resolver/DefaultProductVariantResolver.php
Outdated
Show resolved
Hide resolved
…olver.php Co-authored-by: Victor Vasiloi <victor.vasiloi@gmail.com>
c48127c
to
10a5de6
Compare
Thank you, @Prometee! |
This PR fix an issue introduced by #15273.
Variants are by default ordered by position via a specific Doctrine resource configuration :
https://github.com/Sylius/Sylius/blob/1.12/src/Sylius/Bundle/ProductBundle/Resources/config/doctrine/model/Product.orm.xml#L37-L38
This behaviour has to be cloned to retrieve the right variant.