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

[CreditMemo] Replace unnecessary custom ChannelFilter with the Sylius entity filter #289

Merged
merged 1 commit into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### UPGRADE FROM 1.0.0-RC.9 TO 1.0.0-RC.10

Command bus `sylius_refund_plugin.command_bus` has been replaced with `sylius.command_bus`.
Event bus `sylius_refund_plugin.event_bus` has been replaced with `sylius.event_bus`.
1. Command bus `sylius_refund_plugin.command_bus` has been replaced with `sylius.command_bus`.

1. Event bus `sylius_refund_plugin.event_bus` has been replaced with `sylius.event_bus`.

1. `Sylius\RefundPlugin\Grid\Filter\ChannelFilter` and `Sylius\RefundPlugin\Form\Type\ChannelFilterType` services
have been removed and channel filter configuration in grid has been replaced by entity filter.

### UPGRADE FROM 1.0.0-RC.7 TO 1.0.0-RC.8

Expand Down
1 change: 0 additions & 1 deletion features/filtering_credit_memos.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ Feature: Filtering credit memos
And I filter credit memos by "Web-US" channel
Then there should be 1 credit memo generated
And the only credit memo should be generated for order "#00000001"

35 changes: 0 additions & 35 deletions spec/Grid/Filter/ChannelFilterSpec.php

This file was deleted.

43 changes: 0 additions & 43 deletions src/Form/Type/ChannelFilterType.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/Grid/Filter/ChannelFilter.php

This file was deleted.

7 changes: 3 additions & 4 deletions src/Resources/config/app/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ winzou_state_machine:
to: completed

sylius_grid:
templates:
filter:
credit_memo_channel: '@SyliusRefundPlugin/Grid/Filter/channel.html.twig'
grids:
sylius_refund_credit_memo:
driver:
Expand Down Expand Up @@ -128,8 +125,10 @@ sylius_grid:
type: date
label: sylius_refund.ui.issued_at
channel:
type: credit_memo_channel
type: entity
label: sylius.ui.channel
form_options:
class: "%sylius.model.channel.class%"

doctrine:
dbal:
Expand Down
9 changes: 0 additions & 9 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@
<argument type="service" id="sylius_refund.repository.credit_memo"/>
</service>

<service id="Sylius\RefundPlugin\Form\Type\ChannelFilterType">
<argument type="service" id="sylius.repository.channel" />
<tag name="form.type" />
</service>

<service id="Sylius\RefundPlugin\Grid\Filter\ChannelFilter">
<tag name="sylius.grid_filter" type="credit_memo_channel" form_type="Sylius\RefundPlugin\Form\Type\ChannelFilterType" />
</service>

<service id="sylius.order_processing.shipping_charges_processor" class="Sylius\RefundPlugin\OrderProcessor\ShippingChargesProcessor">
<argument type="service" id="sylius.factory.adjustment" />
<argument type="service" id="sylius.shipping_calculator" />
Expand Down
3 changes: 0 additions & 3 deletions src/Resources/views/Grid/Filter/channel.html.twig

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Behat/Page/Admin/CreditMemoIndexPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function downloadCreditMemo(int $index): void

public function filterByChannel(string $channelName): void
{
$this->getDocument()->find('css', '#criteria_channel_channel')->selectOption($channelName);
$this->getDocument()->find('css', '#criteria_channel')->selectOption($channelName);
}

public function hasCreditMemoWithOrderNumber(int $index, string $orderNumber): bool
Expand Down