Deprecated code removal
Here is the list of the deprecated code that has been removed in version 3 of Front-Commerce.
In the schema of the Graph
Several fields and a mutation were deprecated, they have been removed:
- Remove deprecated
registerUser
mutation: theregisterUser
mutation has been deprecated since version 2.17. Please useregisterCustomer
instead. - Remove deprecated
price
andprice_type
fields on custom option GraphQL types: those fields have been deprecated since 2.9.0. - Remove deprecated
Product.wishlistItem
GraphQL field: this field has been deprecated since version 2.6. - Remove deprecated
Order.status
GraphQL field and related code: this field has been deprecated since version 2.5.
Theme components
- Remove deprecated MondialRelay
getMarkerUrl
function: ⚠️getMarkerUrl
was still used intheme/modules/MondialRelay/MondialRelayPostalAddressItem
, if you have overridden this file you might have to apply the same change as in the merge request. - Remove deprecated
inline
Form/Item
prop: this property has been deprecated in 2.19. - Remove deprecated
theme/components/atoms/Form/Input/Password/passwordValidation
: this has been documented in the 2.12 migration guide. - Remove deprecated
currentOptions
props fromConfigurableOptions
: this change was part of the 2.10 release. - Remove deprecated behavior of
PayzenEmbeddedForm
/PayzenScriptWrapper
: this behavior has been deprecated during the 2.7.0 release. - Remove deprecated
WishlistProductGrid
behavior: this has been deprecated since version 2.6
Those 2 merge requests removed deprecated theme components or exports that are unlikely to affect your project:
- Remove deprecated
theme/organisms/Configurator/RadioOption/RadioOption
- Removes some deprecated export from theme files:
Some properties of several React components were already deprecated in 2.0, those have been removed in the following merge requests:
- Remove deprecated
type
prop fromAlert
,InlineAlert
,FormActions
andLabelledIcon
- Remove deprecated
final
andnice
props fromRecapTableLine
- Remove deprecated
primary
andrelated
props fromLink
Deprecated features
Legacy Analytics
The legacy analytics implementation based on analytics.js has been removed in Remove legacy analytics.
Wysiwyg (V1)
The legacy Wysiwyg
(V1) implementation has been removed in [Remove legacy
Wysiwyg]
(https://gitlab.blackswift.cloud/front-commerce/front-commerce/-/merge_requests/1929)
The WysiwygV2
implementation has been renamed to Wysiwyg
in
this merge request.
To ensure that you are using the correct version of the component, before
running the
automated migration process step, you
should search for any imports in your codebase which is still targeting
Wysiwyg
(V1) implementation: theme/modules/Wysiwyg
, and follow
the documentation to
update the usages to WysiwygV2
.
After running the automated migration process step, all related imports will be automatically updated, for example:
js:
- import Wysiwyg from "theme/modules/WysiwygV2";
+ import Wysiwyg from "theme/modules/Wysiwyg";
gql:
- #import "theme/modules/WysiwygV2/WysiwygFragment.gql"
+ #import "theme/modules/Wysiwyg/WysiwygFragment.gql"
If you imported WysiwygV2
styles in your SCSS code, you will need to ensure
the import now target Wysiwyg instead:
- @import "~theme/modules/WysiwygV2/Wysiwyg";
+ @import "~theme/modules/Wysiwyg/Wysiwyg";
Here is a list of components which have been updated to use the equivalent
WysiwygV2
based field:
- Updated
CmsPage
usage - Updated
Description
usage - Updated
ShortDescription
usage - Updated
Synthesis
usage inProductView
- Updated
Category
usage
We also removed the following as it no longer has any use after the removal of
Wysiwyg
(V1):
- Removed
CmsBlock
which it was essentially re-implementingWysiwygV2
while keeping support forWysiwygV1
which is now removed. - Removed
config/licenses
which took in an html string based onstoreView
, this was used by theGscText
component, we have opted to inline the licenses config, which in turn will allow to apply translations to the text.
Backend
Deprecated public loader methods
Deprecated public methods of loaders have been removed:
- Remove deprecated
Country.getRegionFromCountryAndName
method - Remove deprecated
StoreLoader.isInCurrentStoreGroup()
function - Remove deprecated
chargeTransactionForOrder
from Stripe loader - Remove deprecated
MagentoProductSearchLoader.searchInCategory
method - Remove deprecated sitemap related code (both Magento1 and Magento2)
Support for old version of Magento1 and Magento2 modules
The support for old versions of the Magento modules has been removed, please upgrade Front-Commerce's Magento modules to the latest version.
- Remove deprecated code to handle Magento1 module < 1.2.0
- Remove deprecated Magento2 product loader fallback for old Magento2 module version
- Remove deprecated fallback to Magento2
products
query ifproductsBySkus
does not exist - Remove deprecated Magento2 guest checkout support check fallback
Datasource related (Algolia, ElasticSearch,…)
During the 2.x releases we have improved the datasource mechanism which involved deprecating files and various functions. When used in a project, those element were issuing a deprecation warnings. All the deprecated datasource related code has been removed in the following merge requests:
- Remove deprecated buckets handling
- Remove deprecated
attributeFacets
from Algolia configuration - Remove deprecated
formatCategoryHit
function - Remove deprecated code from ElasticSearch datasource
- Remove deprecated behavior from Front-Commerce/Search module
- Remove deprecated ES and Algolia datasource baseLoader behavior
- Remove deprecated esDatasource folder and
makeSearchDatasource
factories
Implementation changes
Deprecated implementations of several features have been removed. Those changes are unlikely to affect your project:
- Remove deprecated Payment APIs
- Remove deprecated GraphQL directive implementation mechanism
- Remove deprecated Remote Schema stitching handling
Test related APIs
Internal APIs
Those merge requests have removed internal APIs that are unlikely to affect your project.
- Remove deprecated
url
property fromPageLoader
handling - Remove deprecated parameter handling from Magento1 and Magento2 price loader
- Remove deprecated files defining
Customer
andCurrentCustomer
loaders - Remove deprecated image related code
- Remove fully deprecated files
- Remove deprecated
makeConfigFromEnv
from Payzen module - Remove deprecated behavior from Magento1 order loader to handle old Magento1 module
- Remove deprecated Magento2
CustomerLoader
behavior - Remove deprecated address handling in
Checkout
loader for Magento1 and Magento2 - Remove deprecated
formatShippingMethod
from Magento1 - Remove deprecated default number of street lines for Magento1 and Magento2
- Remove deprecated Magento1 layer loader behavior without
makeDataLoader
- Remove deprecated
InMemoryCacheWithDeprecation
- Remove deprecated
decorateLoggerWithTrace
- Remove deprecated express config fields
Features
Some code has also been removed while not explicitly deprecated in 2.x
. Most
of the time it was because the feature was not used or made obsolete with the
release of 3.x
.
Please read the features removal page for more information.