Skip to content

Commit

Permalink
fix: php deprecated log error level (#2989)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiguro-junya authored Aug 26, 2024
1 parent c833a68 commit dc2e712
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changes/nextrelease/update-error-level.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "enhancement",
"category": "",
"description": "Updates PHP runtime deprecation notice to `E_USER_DEPRECATION`"
}
]
2 changes: 1 addition & 1 deletion src/ClientResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ private static function emitDeprecationWarning()
. " or set the environment variable AWS_SUPPRESS_PHP_DEPRECATION_WARNING"
. " to true.\nMore information can be found at: "
. "https://aws.amazon.com/blogs/developer/announcing-the-end-of-support-for-php-runtimes-8-0-x-and-below-in-the-aws-sdk-for-php/\n",
E_USER_WARNING
E_USER_DEPRECATED
);
}
}
4 changes: 2 additions & 2 deletions tests/ClientResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1685,8 +1685,8 @@ public function testEmitsDeprecationWarning()
}

putenv('AWS_SUPPRESS_PHP_DEPRECATION_WARNING=false');
$this->expectWarning();
$this->expectWarningMessage('This installation of the SDK is using PHP version');
$this->expectDeprecation();
$this->expectDeprecationMessage('This installation of the SDK is using PHP version');

$r = new ClientResolver(ClientResolver::getDefaultArguments());

Expand Down

0 comments on commit dc2e712

Please sign in to comment.