Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: php deprecated log error level #2989

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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