Closed kapilpaul closed 8 months ago
Can confirm that we are seeing the '"$this" can no longer be unset since PHP 7.1.' Error when running PHP Compatibility on PHP 8.0, 8.1, 8.2.
We are looking into making a fix for this
I've created PR #108 to fix the issue with ${len}
and confirmed that the $this
error is a false positive.
The code is
unset(self::$resources[spl_object_hash($this)]);
which still works in PHP 8.2 as it's not unsetting $this
itself but just passing it as a parameter to spl_object_hash()
to compute the key for self::$resources
to unset.
This should be fixed in https://github.com/awslabs/aws-crt-php/releases/tag/v1.2.4. @mdio Thank you for investigating and the PR.
Thank you for the quick review and release!
Describe the bug
Hi,
I am using this package in one of my Projects. after running the PHPCS for 8.2 found the below issue in this line.
https://github.com/awslabs/aws-crt-php/blob/2f1dc7b7eda080498be96a4a6d683a41583030e9/src/AWS/CRT/Internal/Encoding.php#L27C10-L27C35
can you please fix it to make it compatible?
Expected Behavior
The same behavior as it is now.
Current Behavior
There is no issue in behavior right now. Just need to make the code change to make it PHP 8.1 compatible.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
aws-crt-php version used
1.2.2
php version used
8.2.10
Operating System and version
MAC OS