diff --git a/.changes/nextrelease/update-error-level.json b/.changes/nextrelease/update-error-level.json new file mode 100644 index 0000000000..33c6821c3e --- /dev/null +++ b/.changes/nextrelease/update-error-level.json @@ -0,0 +1,7 @@ +[ + { + "type": "enhancement", + "category": "", + "description": "Updates PHP runtime deprecation notice to `E_USER_DEPRECATION`" + } +] diff --git a/src/ClientResolver.php b/src/ClientResolver.php index 781c3fb0bb..02f5270f14 100644 --- a/src/ClientResolver.php +++ b/src/ClientResolver.php @@ -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 ); } } diff --git a/tests/ClientResolverTest.php b/tests/ClientResolverTest.php index aa15a48884..638fabfc4f 100644 --- a/tests/ClientResolverTest.php +++ b/tests/ClientResolverTest.php @@ -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());