This file contains the upgrade notes. These notes highlight changes that could break your application when you upgrade the package from one version to another.
-
The Amqp driver has been deprecated. You can still use till
2.1release where it will be removed. It is advised to migrate to Amqp Interop. -
Added
\yii\queue\cli\Command::isWorkerAction()abstract method. If you use yourself console controllers to run queue listeners, you must implement it. -
\yii\queue\cli\Signalhelper is deprecated and will be removed since2.1. The extension uses\yii\queue\cli\SignalLoopinstead of the helper. -
If you had made yourself console controller to listen a queue, you must upgrade it. See native console controllers to upgrade.
-
yii\queue\cli\Verbosebehavior was renamed toyii\queue\cli\VerboseBehavior. Old class was marked as deprecated and will be removed in2.1.0. -
Job,RetryableJobandSerializerinterfaces were renamed toJobInterface,RetryableJobInterfaceandSerializerInterface. Old names are declared as deprecated and will be removed in2.1.0.
- Code has been moved to yii namespace. Check and replace
zhuravljov\yiitoyiinamespace for your project.
-
Event
Queue::EVENT_AFTER_EXEC_ERRORrenamed toQueue::EVENT_AFTER_ERROR. -
Removed method
Queue::later(). Use method chainYii::$app->queue->delay(60)->push()instead. -
Changed table schema for DB driver. Apply migration.
-
Some methods and constants was modified.
- Method
Job::run()modified toJob::execute($queue). - Const
Queue::EVENT_BEFORE_WORKrenamed toQueue::EVENT_BEFORE_EXEC. - Const
Queue::EVENT_AFTER_WORKrenamed toQueue::EVENT_AFTER_EXEC. - Const
Queue::EVENT_AFTER_ERRORrenamed toQueue::EVENT_AFTER_EXEC_ERROR.
- Method
-
Method
Queue::sendMessagerenamed toQueue::pushMessage. Check it if you use it for yourself drivers.
-
Driver property was removed and this functionality was moved into queue classes. If you use public methods of
Yii::$app->queue->driveryou need to use methods ofYii::$app->queue.And you need to check your configs. For example, now config for db queue see:
'queue' => [ 'class' => \zhuravljov\yii\queue\db\Queue::class, 'db' => 'db', 'tableName' => '{{%queue}}', 'channel' => 'default', 'mutex' => \yii\mutex\MysqlMutex::class, ],
Instead of old variant:
'queue' => [ 'class' => \zhuravljov\yii\queue\Queue::class, 'driver' => [ 'class' => \yii\queue\db\Driver::class, 'db' => 'db', 'tableName' => '{{%queue}}' 'channel' => 'default', 'mutex' => \yii\mutex\MysqlMutex::class, ], ],