Skip to content

Commit

Permalink
Merge pull request #447 from GSadee/SYL-4156-refactor-parameters-name…
Browse files Browse the repository at this point in the history
…s-in-1.x

Rename and deprecate parameters
  • Loading branch information
mpysiak authored Nov 25, 2024
2 parents 01cc445 + e5fabb9 commit 8835a11
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions UPGRADE-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,10 @@
| `Sylius\RefundPlugin\StateResolver\RefundPaymentCompletedStateApplierInterface` | `sylius_refund.state_resolver.refund_payment_completed_applier` |
| `Sylius\RefundPlugin\Validator\RefundAmountValidatorInterface` | `sylius_refund.validator.refund_amount` |
| `Sylius\RefundPlugin\Validator\RefundUnitsCommandValidatorInterface` | `sylius_refund.validator.refund_units_command` |

1. The following old parameters have been deprecated and will be removed in RefundPlugin 2.0. Use the corresponding new parameters instead:

| Old parameter | New parameter |
|------------------------------------|------------------------------------|
| `default_logo_file` | `sylius_refund.default_logo_file` |
| `sylius.refund.template.logo_file` | `sylius_refund.template.logo_file` |
2 changes: 1 addition & 1 deletion src/Resources/config/app/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
sylius_refund:
pdf_generator:
allowed_files:
- '%env(default:default_logo_file:resolve:SYLIUS_REFUND_LOGO_FILE)%'
- '%env(default:sylius_refund.default_logo_file:resolve:SYLIUS_REFUND_LOGO_FILE)%'

sylius_resource:
resources:
Expand Down
5 changes: 4 additions & 1 deletion src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

<parameters>
<parameter key="default_logo_file">@SyliusRefundPlugin/Resources/assets/sylius-logo.png</parameter>
<parameter key="sylius.refund.template.logo_file">%env(default:default_logo_file:resolve:SYLIUS_REFUND_LOGO_FILE)%</parameter>
<parameter key="sylius.refund.template.logo_file">%env(default:sylius_refund.default_logo_file:resolve:SYLIUS_REFUND_LOGO_FILE)%</parameter>

<parameter key="sylius_refund.default_logo_file">%default_logo_file%</parameter>
<parameter key="sylius_refund.template.logo_file">%sylius.refund.template.logo_file%</parameter>
</parameters>

<services>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/services/generators.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<argument>null</argument>
<argument type="service" id="file_locator" />
<argument>@SyliusRefundPlugin/Download/creditMemo.html.twig</argument>
<argument>%sylius.refund.template.logo_file%</argument>
<argument>%sylius_refund.template.logo_file%</argument>
<argument>null</argument>
<argument type="service" id="sylius_refund.generator.twig_to_pdf" />
<argument type="service" id="sylius_refund.generator.credit_memo_file_name" />
Expand Down

0 comments on commit 8835a11

Please sign in to comment.