Skip to content

Commit

Permalink
Sync: remove extension on legacy class (#14909)
Browse files Browse the repository at this point in the history
* Sync: remove extension on legacy class

In #14906 were seeing that adding a new parameter to a Sync class
causes legacy classes to complain.

We can fix this by having the legacy class be isolated, and not
extending the new class.

* Sync: updating legacy class

When ever we update methods in sync, we also need to update the legacy methods.
Because the legacy method extends it successor.
  • Loading branch information
roccotripaldi authored Mar 7, 2020
1 parent 557a85a commit 35c35c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/compat/legacy/class-jetpack-sync-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ public static function set_is_importing_true() {
* @param Integer $queue_id the queue identifier.
* @param Integer $checkout_duration time spent retrieving items.
* @param Integer $preprocess_duration Time spent converting items into data.
* @param Integer $queue_size The current size of the sync queue.
*
* @return WP_Response the response object.
*/
public static function send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration ) {
public static function send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration, $queue_size = null ) {
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Actions' );

return Actions::send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration );
return Actions::send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration, $queue_size );
}

/**
Expand Down

0 comments on commit 35c35c5

Please sign in to comment.