-
Notifications
You must be signed in to change notification settings - Fork 340
2_1_0_migration_from_2_0_0
During the development process we realize that few things need to be fixed to match Magento 2.x development standards :
-
First the composer vendor name we were previously using (
smile-sa
), is not compliant with the standard used in Magento since it have to match the PHP namespace we use into the code. As a result static tests will raise a lot of warning if we had not changed our vendor name fromsmile-sa
tosmile
-
Second, and always regarding Magento strict policy, PHP namespaces and module name have to follow a strict policy. As a result our modules and PHP namespaces have to be renamed (notice the subtile case variation) :
-
Smile_ElasticSuite*
toSmile_Elasticsuite*
for the modules names -
\Smile\ElasticSuite*\
to \Smile\Elasticsuite*` for the PHP namespaces.
-
Renaming everything was an uneasy decision to be made since it does break backward compatibility when updating to version 2.1.0. But as the module is still in its early stages we consider it was the best decision to be taken since the number of errors raised by static testing made the module quite uncomfortable to work with.
It is an exceptional decision which concerns only version 2.1.0 of the module which is still young. Future updates will be as simple as just running composer update.
First of all you will need adjust you composer installation by removing the old package using the old package vendor name :
composer remove "smile-sa/elasticsuite" --no-update
Then append the new ElasticSuite version :
composer require "smile/elasticsuite" "2.1.0" --no-update
Then you can run the composer install and clean all local caches and DI :
composer update
bin/magento cache:clean
bin/magento cache:flush
rm -rf var/di var/generation
Before running the Magento database update script, you will need to clean the database to remove all previously installed ElasticSuite modules. It is required since we changed the case of the module name.
As our setup script is reentrant you can safely just drop the ElasticSuite modules setup rows from the setup_module
without care about data eventual data loss :
DELETE FROM setup_module WHERE module LIKE 'Smile_ElasticSuite%'
In the end you will have to run the Magento upgrade script, reindex and deploy static content everything through :
bin/magento setup:upgrade
bin/magento indexer:reindex
bin/magento setup:static-content:deploy
bin/magento cache:clean
bin/magento cache:flush
rm -rf var/di var/generation
As explained above, both modules names and PHP namespaces have been updated.
As a result you will need to fix your own code to reflect those changes :
-
All references to our classes have to be update. You will need to replace all reference to
Smile\ElasticSuite*
by reference toSmile\Elasticsuite*
-
Do not forget to update references into you DI config where variations can appears such as
Smile\\ElasticSuite
-
The module names have been updated, so all references to
Smile_ElasticSuite*
would need a replacement by ``Smile_Elasticsuite*` -
Be careful since the module name can appears into your themes as a folder name (eg:
theme-mysupertheme/Smile_ElasticSuiteCatalog
). The case of these folders have to be updated too.
-
User's Guide
-
Developer's Guide
-
Releases
- Magento 2.3.x
- Magento 2.2.x
- Magento 2.1.x
- ElasticSuite 2.5.15
- ElasticSuite 2.5.14
- ElasticSuite 2.5.13
- ElasticSuite 2.5.12
- ElasticSuite 2.5.11
- ElasticSuite 2.5.10
- ElasticSuite 2.5.9
- ElasticSuite 2.5.8
- ElasticSuite 2.5.7
- ElasticSuite 2.5.6
- ElasticSuite 2.5.5
- ElasticSuite 2.5.4
- ElasticSuite 2.5.3
- ElasticSuite 2.5.2
- ElasticSuite 2.5.1
- ElasticSuite 2.5.0
- ElasticSuite 2.4.6
- ElasticSuite 2.4.5
- ElasticSuite 2.4.4
- ElasticSuite 2.4.3
- ElasticSuite 2.4.2
- ElasticSuite 2.4.1
- ElasticSuite 2.4.0
- ElasticSuite 2.3.10
- ElasticSuite 2.3.9
- ElasticSuite 2.3.8
- ElasticSuite 2.3.7
- ElasticSuite 2.3.6
- ElasticSuite 2.3.5
- ElasticSuite 2.3.4
- ElasticSuite 2.3.3
- ElasticSuite 2.3.2
- ElasticSuite 2.3.1
- ElasticSuite 2.3.0
- Magento 2.0.x