From e1702ae9e6194fa392b64a11737c5e3252d2c8e6 Mon Sep 17 00:00:00 2001 From: Xiaoning Liu Date: Mon, 25 Sep 2017 14:19:39 +0800 Subject: [PATCH] Fixed a syntax error for PHP 5.5 and 5.6 in `MicrosoftAzure\Storage\Common\Internal::Utilities:isoDate`. --- ChangeLog.md | 5 +++++ src/Common/Internal/Resources.php | 2 +- src/Common/Internal/Utilities.php | 3 ++- tests/Unit/Blob/Models/CopyBlobOptionsTest.php | 2 -- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 0dd44b694..eb9622076 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +2017.09 - version 0.19.1 + +ALL +* Fixed a syntax error for PHP 5.5 and 5.6 in `MicrosoftAzure\Storage\Common\Internal::Utilities:isoDate`. + 2017.09 - version 0.19.0 ALL diff --git a/src/Common/Internal/Resources.php b/src/Common/Internal/Resources.php index 48b855f64..5e344c5c9 100644 --- a/src/Common/Internal/Resources.php +++ b/src/Common/Internal/Resources.php @@ -307,7 +307,7 @@ class Resources const DEAFULT_RETRY_INTERVAL = 1000;//Milliseconds // Header values - const SDK_VERSION = '0.19.0'; + const SDK_VERSION = '0.19.1'; const STORAGE_API_LATEST_VERSION = '2016-05-31'; const DATA_SERVICE_VERSION_VALUE = '3.0'; const MAX_DATA_SERVICE_VERSION_VALUE = '3.0;NetFx'; diff --git a/src/Common/Internal/Utilities.php b/src/Common/Internal/Utilities.php index 9ebd8bae9..d588bed1c 100644 --- a/src/Common/Internal/Utilities.php +++ b/src/Common/Internal/Utilities.php @@ -374,7 +374,8 @@ public static function rfc1123ToDateTime($date) */ public static function isoDate(\DateTimeInterface $date) { - $date = (clone $date)->setTimezone(new \DateTimeZone('UTC')); + $date = clone $date; + $date = $date->setTimezone(new \DateTimeZone('UTC')); return str_replace('+00:00', 'Z', $date->format('c')); } diff --git a/tests/Unit/Blob/Models/CopyBlobOptionsTest.php b/tests/Unit/Blob/Models/CopyBlobOptionsTest.php index 44ee2559a..8f3c42d57 100644 --- a/tests/Unit/Blob/Models/CopyBlobOptionsTest.php +++ b/tests/Unit/Blob/Models/CopyBlobOptionsTest.php @@ -140,8 +140,6 @@ public function testSetIsIncrementalCopy() } /** - * @covers MicrosoftAzure\Storage\Blob\Models\CopyBlobFromURLOptions::setSourceSnapshot - * @covers MicrosoftAzure\Storage\Blob\Models\CopyBlobFromURLOptions::getSourceSnapshot * @covers MicrosoftAzure\Storage\Blob\Models\CopyBlobOptions::setSourceSnapshot * @covers MicrosoftAzure\Storage\Blob\Models\CopyBlobOptions::getSourceSnapshot */