From d1d510693d2effd494f3422083b531faca5b35fb Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Tue, 31 Dec 2019 13:00:34 -0400 Subject: [PATCH 1/2] release version 3.0.0 --- action-scheduler.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/action-scheduler.php b/action-scheduler.php index 007a00df2..9bcfe66a3 100644 --- a/action-scheduler.php +++ b/action-scheduler.php @@ -5,7 +5,7 @@ * Description: A robust scheduling library for use in WordPress plugins. * Author: Automattic * Author URI: https://automattic.com/ - * Version: 3.0.0-RC-4 + * Version: 3.0.0 * License: GPLv3 * * Copyright 2019 Automattic, Inc. (https://automattic.com/contact/) @@ -25,28 +25,28 @@ * */ -if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_0_rc_4' ) ) { +if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_0' ) ) { if ( ! class_exists( 'ActionScheduler_Versions' ) ) { require_once( 'classes/ActionScheduler_Versions.php' ); add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 ); } - add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_0_rc_4', 0, 0 ); + add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_0', 0, 0 ); - function action_scheduler_register_3_dot_0_dot_0_rc_4() { + function action_scheduler_register_3_dot_0_dot_0() { $versions = ActionScheduler_Versions::instance(); - $versions->register( '3.0.0-RC-4', 'action_scheduler_initialize_3_dot_0_dot_0_rc_4' ); + $versions->register( '3.0.0', 'action_scheduler_initialize_3_dot_0_dot_0' ); } - function action_scheduler_initialize_3_dot_0_dot_0_rc_4() { + function action_scheduler_initialize_3_dot_0_dot_0() { require_once( 'classes/abstracts/ActionScheduler.php' ); ActionScheduler::init( __FILE__ ); } // Support usage in themes - load this version if no plugin has loaded a version yet. if ( did_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler' ) ) { - action_scheduler_register_3_dot_0_dot_0_rc_4(); + action_scheduler_register_3_dot_0_dot_0(); do_action( 'action_scheduler_pre_theme_init' ); ActionScheduler_Versions::initialize_latest_version(); } From fd29c14a1f3c3fbfd82cc6c341159f8a88c280be Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Wed, 1 Jan 2020 10:32:46 -0400 Subject: [PATCH 2/2] allow small delta time in api unit test --- tests/phpunit/procedural_api/procedural_api_Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/procedural_api/procedural_api_Test.php b/tests/phpunit/procedural_api/procedural_api_Test.php index 43c20f9c2..ffa5186df 100644 --- a/tests/phpunit/procedural_api/procedural_api_Test.php +++ b/tests/phpunit/procedural_api/procedural_api_Test.php @@ -238,7 +238,7 @@ public function test_as_get_datetime_object_timezone() { $au_now = new ActionScheduler_DateTime(null); $as_au_now = as_get_datetime_object(); - $this->assertEquals($au_now->getTimestamp(),$as_now->getTimestamp()); + $this->assertEquals( $au_now->getTimestamp(), $as_now->getTimestamp(), '', 2 ); // But not in the same timezone, as $as_now should be using UTC $this->assertNotEquals($au_now->format('Y-m-d H:i:s'),$as_now->format('Y-m-d H:i:s'));