3.5 KiB
Upgrading Instructions
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.
Upgrade to 2.3.6
- The
maxPriorityproperty was removed from amqp_interop. Use propertyqueueOptionalArgumentsargumentx-max-priority.
Upgrade to 2.1.1
\yii\queue\ErrorEventhas been deprecated and will be removed in3.0. Use\yii\queue\ExecEventinstead.
Upgrade from 2.0.1 to 2.0.2
-
The Amqp driver has been deprecated and will be removed in
2.1. It is advised to migrate to Amqp Interop instead. -
Added
\yii\queue\cli\Command::isWorkerAction()abstract method. If you use your own console controllers to run queue listeners, you must implement it. -
\yii\queue\cli\Signalhelper is deprecated and will be removed in2.1. The extension uses\yii\queue\cli\SignalLoopinstead of the helper. -
If you use your own console controller to listen to a queue, you must upgrade it. See the native console controllers for how to upgrade.
Upgrade from 2.0.0 to 2.0.1
-
yii\queue\cli\Verbosebehavior was renamed toyii\queue\cli\VerboseBehavior. The old class was marked as deprecated and will be removed in2.1.0. -
Job,RetryableJobandSerializerinterfaces were renamed toJobInterface,RetryableJobInterfaceandSerializerInterface. The old names are declared as deprecated and will be removed in2.1.0.
Upgrade from 1.1.0 to 2.0.0
- Code has been moved to yii namespace. Check and replace
zhuravljov\yiitoyiinamespace for your project.
Upgrade from 1.0.0 to 1.1.0
-
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.
Upgrade from 0.x to 1.0.0
-
Some methods and constants were 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 in your own custom drivers.
Upgrade from 0.10.1
-
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 the methods ofYii::$app->queue.You also need to check your configs. For example, now the config for the db queue is:
'queue' => [ 'class' => \zhuravljov\yii\queue\db\Queue::class, 'db' => 'db', 'tableName' => '{{%queue}}', 'channel' => 'default', 'mutex' => \yii\mutex\MysqlMutex::class, ],Instead of the 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, ], ],