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

Don't remove driver options when extending a grid configuration #316

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

loic425
Copy link
Member

@loic425 loic425 commented Jan 2, 2024

Based on #317

<?php

use App\Entity\Suplier;
use Sylius\Bundle\GridBundle\Builder\GridBuilder;
use Sylius\Bundle\GridBundle\Config\GridConfig;

return static function (GridConfig $grid) {
    $grid->addGrid(
        GridBuilder::create('sylius_admin_product_variant')
    );
};

When running this following command:

$ bin/console debug:config sylius_grid grids.sylius_admin_product_variant.driver

Before

name: doctrine/orm
options: {  }

After

name: doctrine/orm
options:
    class: App\Entity\Product\ProductVariant
    repository:
        method: createQueryBuilderByProductId
        arguments:
            - "expr:service('sylius.context.locale').getLocaleCode()"
            - $productId

@loic425 loic425 force-pushed the fix/do-not-remove-driver-options branch from 599951b to 46cfac8 Compare January 2, 2024 14:30
@loic425 loic425 changed the base branch from 1.13 to 1.12 January 2, 2024 14:30
@loic425 loic425 force-pushed the fix/do-not-remove-driver-options branch from 46cfac8 to c7d75bd Compare January 2, 2024 14:31
@loic425 loic425 added the Bug Confirmed bugs or bugfixes. label Jan 2, 2024
@GSadee GSadee merged commit 3982f7c into Sylius:1.12 Jan 5, 2024
7 checks passed
@GSadee
Copy link
Member

GSadee commented Jan 5, 2024

Thanks, Loïc! 🥇

@loic425 loic425 deleted the fix/do-not-remove-driver-options branch January 5, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants