Upgrade the Messenger module
Edit on GitHubThis migration guide is a part of the Silex migration effort.
To upgrade the module, do the following:
- Update the module using Composer:
composer update spryker/messenger
- Remove old service providers, if you have them in the project:
\Spryker\Yves\Messenger\Plugin\Provider\FlashMessengerServiceProvider
\Spryker\Zed\Messenger\Communication\Plugin\ServiceProvider\MessengerServiceProvider
- Add new plugins to dependency providers:
Zed integration
<?php
namespace Pyz\Zed\Application;
use Spryker\Zed\Application\ApplicationDependencyProvider as SprykerApplicationDependencyProvider;
use Spryker\Zed\Messenger\Communication\Plugin\Application\MessengerApplicationPlugin;
class ApplicationDependencyProvider extends SprykerApplicationDependencyProvider
{
...
/**
* @return \Spryker\Shared\ApplicationExtension\Dependency\Plugin\ApplicationPluginInterface[]
*/
protected function getApplicationPlugins(): array
{
return [
...
new MessengerApplicationPlugin(),
...
];
}
...
}
Yves integration
<?php
namespace Pyz\Yves\ShopApplication;
use Spryker\Yves\ShopApplication\ShopApplicationDependencyProvider as SprykerShopApplicationDependencyProvider;
use Spryker\Yves\Messenger\Plugin\Application\MessengerApplicationPlugin;
class ShopApplicationDependencyProvider extends SprykerShopApplicationDependencyProvider
{
...
/**
* @return \Spryker\Shared\ApplicationExtension\Dependency\Plugin\ApplicationPluginInterface[]
*/
protected function getApplicationPlugins(): array
{
return [
...
new MessengerApplicationPlugin(),
...
];
}
...
}
Thank you!
For submitting the form