Upgrade the CmsPageSearch module
Edit on GitHubUpgrading from version 2.1.* to version 2.2.*
Prerequisites
This migration guide is a part of the Search migration effort. Prior to upgrading this module, make sure you have completed all the steps from the Search Migration Guide.
Estimated migration time: 30 minutes
To upgrade the module, do the following:
- Update the module using Composer:
composer update spryker/cms-page-search
- Remove all deprecated query expander plugins coming from the Search module (if any) from
Pyz\Client\CmsPageSearch\CmsPageSearchDependencyProvider
:
Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\IsActiveInDateRangeQueryExpanderPlugin
Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\IsActiveQueryExpanderPlugin
Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\LocalizedQueryExpanderPlugin
Spryker\Client\Search\Plugin\Elasticsearch\QueryExpander\StoreQueryExpanderPlugin
- Enable the replacement plugins:
Pyz\Client\CmsPageSearch
<?php
namespace Pyz\Client\CmsPageSearch;
...
use Spryker\Client\CmsPageSearch\CmsPageSearchDependencyProvider as SprykerCmsPageSearchDependencyProvider;
use Spryker\Client\SearchElasticsearch\Plugin\QueryExpander\IsActiveInDateRangeQueryExpanderPlugin;
use Spryker\Client\SearchElasticsearch\Plugin\QueryExpander\IsActiveQueryExpanderPlugin;
use Spryker\Client\SearchElasticsearch\Plugin\QueryExpander\LocalizedQueryExpanderPlugin;
use Spryker\Client\SearchElasticsearch\Plugin\QueryExpander\StoreQueryExpanderPlugin;
class CmsPageSearchDependencyProvider extends SprykerCmsPageSearchDependencyProvider
{
...
/**
* @return \Spryker\Client\SearchExtension\Dependency\Plugin\QueryExpanderPluginInterface[]
*/
protected function createCmsPageSearchQueryExpanderPlugins(): array
{
return [
...
new StoreQueryExpanderPlugin(),
new LocalizedQueryExpanderPlugin(),
new IsActiveQueryExpanderPlugin(),
new IsActiveInDateRangeQueryExpanderPlugin(),
];
}
/**
* @return \Spryker\Client\SearchExtension\Dependency\Plugin\QueryExpanderPluginInterface[]
*/
protected function createCmsPageSearchCountQueryExpanderPlugins(): array
{
return [
new StoreQueryExpanderPlugin(),
new LocalizedQueryExpanderPlugin(),
new IsActiveQueryExpanderPlugin(),
new IsActiveInDateRangeQueryExpanderPlugin(),
];
}
}
- Remove the deprecated plugin usages listed below from
Pyz\Zed\Search\SearchDependencyProvider
:
Spryker\Zed\CmsPageSearch\Communication\Plugin\Search\CmsDataPageMapBuilder
Upgrading from version 1.* to version 2.*
Version 2.0.0 of the CmsPageSearch
module introduces the multi-store functionality. The multi-store CMS page feature enables management of CMS page display per store via a store toggle control in the Back Office.
To avoid the BC break, a synchronization behavior must be removed.
To upgrade to the new version of the module, do the following:
- Update
cms-page-search
to^2.0.0
with the command:composer update spryker/cms-page-search:^2.0.0
- Remove
queue_pool=synchronizationPool
behavior from thespy_cms_page_search
table.src/Pyz/Zed/CmsPageSearch/Persistence/Propel/Schema/spy_cms_page_search.schema.xml<behavior name="synchronization"><parameter name="queue_pool" value="synchronizationPool" /></behavior>
When completed, the above synchronization parameter should not be in the file.
- Apply the database changes:
$ console propel:install
- Generate new transfers:
$ console transfer:generate
Thank you!
For submitting the form