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.
- Code has been moved to yii namespace. Check and replace
zhuravljov\yii
toyii
namespace for your project.
-
Event
Queue::EVENT_AFTER_EXEC_ERROR
renamed 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_WORK
renamed toQueue::EVENT_BEFORE_EXEC
. - Const
Queue::EVENT_AFTER_WORK
renamed toQueue::EVENT_AFTER_EXEC
. - Const
Queue::EVENT_AFTER_ERROR
renamed toQueue::EVENT_AFTER_EXEC_ERROR
.
- Method
-
Method
Queue::sendMessage
renamed 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->driver
you 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, ], ],