Skip to content

Commit 83372b4

Browse files
committed
NEXT-15782 - Feature flag removal
1 parent e3769a0 commit 83372b4

File tree

59 files changed

+331
-956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+331
-956
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
This is the official changelog index of Shopware 6. Here you find a registry of all Shopware 6 releases with a reference to the detailed changelog of each version. If you want to know more about how the changelog is created have a look [here](/adr/2020-08-03-Implement-New-Changelog.md).
33

44
## 6.4.3.0
5+
* [NEXT-14114 - Add the new field is tax-free from to table currency and country.](/changelog/release-6-4-3-0/2021-03-10-add-new-field-tax-free-from-to-table-currency-and-country.md)
6+
* [NEXT-14118 - Add VAT id required to each country setting](/changelog/release-6-4-3-0/2021-03-21-add-vat-id-required-to-each-country-setting.md)
7+
* [NEXT-14117 - Handling tax-free in storefront](/changelog/release-6-4-3-0/2021-03-26-handling-tax-free-in-storefront.md)
8+
* [NEXT-14599 - Handling tax-free dependent values](/changelog/release-6-4-3-0/2021-05-11-handling-tax-free-dependent-values.md)
9+
* [NEXT-14605 - Ui change for brexit changes.](/changelog/release-6-4-3-0/2021-05-21-ui-change-for-brexit-change.md)
510
* [NEXT-12482 - Add more isEmpty condition for Shipping postal cost](/changelog/release-6-4-3-0/2021-04-20-add-more-isempty-condition-for-shipping-postal-cost.md)
611
* [NEXT-15172 - Sanitize HTML contents of fields and CMS text elements](/changelog/release-6-4-3-0/2021-05-19-sanitize-html-content-of-fields-and-cms-text-elements.md)
712
* [NEXT-14362 - ACLs for app system](/changelog/release-6-4-3-0/2021-05-27-acls-for-app-system.md)

UPGRADE-6.4.md

+62
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,68 @@ UPGRADE FROM 6.3.x.x to 6.4
22
=======================
33

44
# 6.4.3.0
5+
## Change tax-free get and set in CountryEntity
6+
Deprecated `taxFree` and `companyTaxFree` in `Shopware/Core/System/Country/CountryEntity`, use `customerTax` and `companyTax` instead.
7+
8+
## If you are writing the fields directly, the tax-free of the country will be used:
9+
### Before
10+
```php
11+
$countryRepository->create([
12+
[
13+
'id' => Uuid::randomHex(),
14+
'taxFree' => true,
15+
'companyTaxFree' => true,
16+
...
17+
]
18+
],
19+
$context
20+
);
21+
```
22+
### After
23+
```php
24+
$countryRepository->create([
25+
[
26+
'id' => Uuid::randomHex(),
27+
'customerTax' => [
28+
'enabled' => true, // enabled is taxFree value in old version
29+
'currencyId' => $currencyId,
30+
'amount' => 0,
31+
],
32+
'companyTax' => [
33+
'enabled' => true, // enabled is companyTaxFree value in old version
34+
'currencyId' => $currencyId,
35+
'amount' => 0,
36+
],
37+
...
38+
]
39+
],
40+
$context
41+
);
42+
```
43+
## How to use the new getter and setter of tax-free in country:
44+
### Before
45+
* To get tax-free
46+
```php
47+
$country->getTaxFree();
48+
$country->getCompanyTaxFree();
49+
```
50+
* To set tax-free
51+
```php
52+
$country->setTaxFree($isTaxFree);
53+
$country->setCompanyTaxFree($isTaxFree);
54+
```
55+
### After
56+
* To get tax-free
57+
```php
58+
$country->getCustomerTax()->getEnabled(); // enabled is taxFree value in old version
59+
$country->getCompanyTax()->getEnabled(); // enabled is companyTaxFree value in old version
60+
```
61+
* To set tax-free
62+
```php
63+
// TaxFreeConfig::__construct(bool $enabled, string $currencyId, float $amount);
64+
$country->setCusotmerTax(new TaxFreeConfig($isTaxFree, $currencyId, $amount));
65+
$country->setCompanyTax(new TaxFreeConfig($isTaxFree, $currencyId, $amount));
66+
```
567
## Update EntityIndexer implementation
668
Two new methods have been added to the abstract `Shopware\Core\Framework\DataAbstractionLayer\Indexing\EntityIndexer`.
769
* `getTotal` - Shall return the number of records to be processed by the indexer on a Full index.

changelog/_unreleased/2021-03-10-add-new-field-tax-free-from-to-table-currency-and-country.md changelog/release-6-4-3-0/2021-03-10-add-new-field-tax-free-from-to-table-currency-and-country.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Add the new field is tax-free from to table currency and country.
33
issue: NEXT-14114
4-
flag: FEATURE_NEXT_14114
54
---
65
# Core
76
* Added new property `taxFreeFrom` in class `Shopware\Core\System\Country\CountryEntity` which used to define an amount value will be applying for the tax-free based on countries of the user.

changelog/_unreleased/2021-03-21-add-vat-id-required-to-each-country-setting.md changelog/release-6-4-3-0/2021-03-21-add-vat-id-required-to-each-country-setting.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Add VAT id required to each country setting
33
issue: NEXT-14118
4-
flag: FEATURE_NEXT_14114
54
---
65
# Core
76
* Added new property `vatIdRequired` in class `Shopware\Core\System\Country\CountryEntity`.

changelog/_unreleased/2021-03-26-handling-tax-free-in-storefront.md changelog/release-6-4-3-0/2021-03-26-handling-tax-free-in-storefront.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Handling tax-free in storefront
33
issue: NEXT-14117
4-
flag: FEATURE_NEXT_14114
54
---
65
# Core
76
* Changed the way to get `taxState` in function `calculate` at `Shopware\Core\Checkout\Cart\Price\QuantityPriceCalculator` class.

changelog/_unreleased/2021-05-11-handling-tax-free-dependent-values.md changelog/release-6-4-3-0/2021-05-11-handling-tax-free-dependent-values.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Handling tax-free dependent values
33
issue: NEXT-14599
4-
flag: FEATURE_NEXT_14114
54
---
65
# Core
76
* Deprecated `taxFree` from `Shopware/Core/System/Country/CountryEntity`, use `$customerTax->getEnabled()` instead.

changelog/_unreleased/2021-05-21-ui-change-for-brexit-change.md changelog/release-6-4-3-0/2021-05-21-ui-change-for-brexit-change.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Ui change for brexit changes.
33
issue: NEXT-14605
4-
flag: FEATURE_NEXT_14114
54
---
65
# Administration
76
* Changed the value of `showSelection` from `false` to `true` in `sw-setting-country-list` for able multiple delete countries in the country setting list screen.

src/Administration/Resources/app/administration/src/app/component/context-menu/sw-context-button/index.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,12 @@ Component.register('sw-context-button', {
163163

164164
// check if the user clicked inside the context menu
165165
const clickedInside = contextButton ? contextButton.contains(event.target) : false;
166-
if (this.feature.isActive('FEATURE_NEXT_14114')) {
167-
if (this.autoCloseOutsideClick && this.showMenu && !clickedInside) {
168-
const contextMenu = this.$refs.swContextMenu.$el;
169-
const clickedOutside = contextMenu?.contains(event.target) ?? false;
170-
171-
if (!event?.target || !clickedOutside) {
172-
return this.closeMenu();
173-
}
166+
if (this.autoCloseOutsideClick && this.showMenu && !clickedInside) {
167+
const contextMenu = this.$refs.swContextMenu.$el;
168+
const clickedOutside = contextMenu?.contains(event.target) ?? false;
169+
170+
if (!event?.target || !clickedOutside) {
171+
return this.closeMenu();
174172
}
175173
}
176174

src/Administration/Resources/app/administration/src/app/component/data-grid/sw-data-grid/sw-data-grid.html.twig

+1-4
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@
206206
</sw-data-grid-settings>
207207

208208
{% block sw_data_grid_settings_custom_settings %}
209-
<slot
210-
v-if="feature.isActive('FEATURE_NEXT_14114')"
211-
name="customSettings"
212-
>
209+
<slot name="customSettings">
213210
{% block sw_data_grid_settings_custom_settings_slot %}{% endblock %}
214211
</slot>
215212
{% endblock %}

src/Administration/Resources/app/administration/src/module/sw-settings-country/component/sw-settings-country-currency-dependent-modal/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ const utils = Shopware.Utils;
66

77
Component.register('sw-settings-country-currency-dependent-modal', {
88
template,
9-
flag: 'FEATURE_NEXT_14114',
109

1110
inject: [
1211
'repositoryFactory',
1312
'acl',
14-
'feature',
1513
],
1614

1715
props: {

src/Administration/Resources/app/administration/src/module/sw-settings-country/component/sw-settings-country-currency-hamburger-menu/index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ const { Component } = Shopware;
55

66
Component.register('sw-settings-country-currency-hamburger-menu', {
77
template,
8-
flag: 'FEATURE_NEXT_14114',
98

10-
inject: [
11-
'acl',
12-
'feature',
13-
],
9+
inject: ['acl'],
1410

1511
props: {
1612
isLoading: {

src/Administration/Resources/app/administration/src/module/sw-settings-country/component/sw-settings-country-general/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ const { Criteria } = Shopware.Data;
88

99
Component.register('sw-settings-country-general', {
1010
template,
11-
flag: 'FEATURE_NEXT_14114',
1211

1312
inject: [
1413
'repositoryFactory',
1514
'acl',
16-
'feature',
1715
],
1816

1917
mixins: [

src/Administration/Resources/app/administration/src/module/sw-settings-country/component/sw-settings-country-general/sw-settings-country-general.html.twig

+2-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
{% endblock %}
9191

9292
<sw-container
93-
v-if="feature.isActive('FEATURE_NEXT_14114') && country.customerTax.enabled"
93+
v-if="country.customerTax.enabled"
9494
class="sw-settings-country-general-customer-tax"
9595
>
9696

@@ -148,7 +148,7 @@
148148
{% endblock %}
149149

150150
<sw-container
151-
v-if="feature.isActive('FEATURE_NEXT_14114') && country.companyTax.enabled"
151+
v-if="country.companyTax.enabled"
152152
class="sw-settings-country-general-company-tax"
153153
>
154154

@@ -222,7 +222,6 @@
222222

223223
{% block sw_settings_country_general_content_field_vat_id_required %}
224224
<sw-switch-field
225-
v-if="feature.isActive('FEATURE_NEXT_14114')"
226225
v-model="country.vatIdRequired"
227226
class="sw-settings-country-general__vat-id-required sw-settings-country-general__option-items"
228227
bordered

src/Administration/Resources/app/administration/src/module/sw-settings-country/component/sw-settings-country-state/index.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ const { Component, Mixin } = Shopware;
55

66
Component.register('sw-settings-country-state', {
77
template,
8-
flag: 'FEATURE_NEXT_14114',
98

109
inject: [
1110
'repositoryFactory',
1211
'acl',
13-
'feature',
1412
],
1513

1614
mixins: [
@@ -104,8 +102,7 @@ Component.register('sw-settings-country-state', {
104102
this.refreshCountryStateList();
105103
this.currentCountryState = null;
106104
}).catch(errors => {
107-
if (this.feature.isActive('FEATURE_NEXT_14114')
108-
&& errors.response.data.errors[0].code === 'MISSING-SYSTEM-TRANSLATION') {
105+
if (errors.response.data.errors[0].code === 'MISSING-SYSTEM-TRANSLATION') {
109106
this.createNotificationError({
110107
message: this.$tc('sw-country-state-detail.createNewStateError'),
111108
});

src/Administration/Resources/app/administration/src/module/sw-settings-country/page/sw-settings-country-create/index.js

+10-14
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ const utils = Shopware.Utils;
66
Component.extend('sw-settings-country-create', 'sw-settings-country-detail', {
77
template,
88

9-
inject: ['feature'],
10-
119
beforeRouteEnter(to, from, next) {
1210
if (to.name.includes('sw.settings.country.create') && !to.params.id) {
1311
to.params.id = utils.createId();
@@ -22,18 +20,16 @@ Component.extend('sw-settings-country-create', 'sw-settings-country-detail', {
2220

2321
if (this.$route.params.id) {
2422
this.country = this.countryRepository.create(Shopware.Context.api, this.$route.params.id);
25-
if (this.feature.isActive('FEATURE_NEXT_14114')) {
26-
this.country.customerTax = {
27-
amount: 0,
28-
currencyId: Shopware.Context.app.systemCurrencyId,
29-
enabled: false,
30-
};
31-
this.country.companyTax = {
32-
amount: 0,
33-
currencyId: Shopware.Context.app.systemCurrencyId,
34-
enabled: false,
35-
};
36-
}
23+
this.country.customerTax = {
24+
amount: 0,
25+
currencyId: Shopware.Context.app.systemCurrencyId,
26+
enabled: false,
27+
};
28+
this.country.companyTax = {
29+
amount: 0,
30+
currencyId: Shopware.Context.app.systemCurrencyId,
31+
enabled: false,
32+
};
3733
this.countryId = this.country.id;
3834
this.countryStateRepository = this.repositoryFactory.create(
3935
this.country.states.entity,

0 commit comments

Comments
 (0)