Deprecate \MailPoet\Models\ScheduledTaskSubscriber::setSubscribers()
This model is no longer used since Sending::setSubscribers() was refactored in a previous commit. [MAILPOET-4368]
This commit is contained in:
committed by
Aschepikov
parent
8fd8b8f193
commit
57129bd460
@ -41,7 +41,11 @@ class ScheduledTaskSubscriber extends Model {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated This method can be removed after 2024-01-04.
|
||||||
|
*/
|
||||||
public static function setSubscribers($taskId, array $subscriberIds) {
|
public static function setSubscribers($taskId, array $subscriberIds) {
|
||||||
|
self::deprecationError(__METHOD__);
|
||||||
static::clearSubscribers($taskId);
|
static::clearSubscribers($taskId);
|
||||||
return static::addSubscribers($taskId, $subscriberIds);
|
return static::addSubscribers($taskId, $subscriberIds);
|
||||||
}
|
}
|
||||||
@ -77,4 +81,11 @@ class ScheduledTaskSubscriber extends Model {
|
|||||||
}
|
}
|
||||||
return $orm->count();
|
return $orm->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function deprecationError($methodName) {
|
||||||
|
trigger_error(
|
||||||
|
'Calling ' . esc_html($methodName) . ' is deprecated and will be removed. Use \MailPoet\Newsletter\Sending\ScheduledTaskSubscribersRepository and \MailPoet\Entities\ScheduledTaskSubscriberEntity instead.',
|
||||||
|
E_USER_DEPRECATED
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user