Deprecation of PHP language versions less than 7.2.5 in the AWS SDK

149 Views Asked by At

I recently came across this deprecation warning of the SDK is using PHP version 5.5.38, which will be deprecated on August 15th, 2023. Please upgrade your PHP version to a minimum of 7.2.5 before then to continue receiving updates to the AWS SDK for PHP.

Before 15 Aug 2023, It was just giving the warning and did not affect code execution. But just after then it stopped executing our code and throwing the same warning messages.

So, what is the quick fix/short-term solution for this?

1

There are 1 best solutions below

1
Kamal Kant On

Our application's code was operating with legacy features, making it challenging to swiftly transition from PHP 5 to PHP 7. Given this situation, it was imperative to identify a prompt and effective solution for the issue at hand.

The solution entails introducing a global environment variable and configuring the AWS_SUPPRESS_PHP_DEPRECATION_WARNING flag to 'true' within a Docker container or the corresponding runtime environment of your code. In my specific scenario, our applications operate within Docker containers.

AWS_SUPPRESS_PHP_DEPRECATION_WARNING = true

Upon successfully implementing this environmental setup within your application's runtime environment, the problem should cease to manifest.