Change Call to deprecated function openssl_pkey_free() in PHP ~8

Created on 20 June 2024, 6 months ago
Updated 29 July 2024, 5 months ago

Problem/Motivation

Varbase API
Scanned on Thu, 06/20/2024 - 17:44.

1 warning found.

modules/contrib/varbase_api/src/OAuthKey.php:
+----------------+------+---------------------------------------------------+
| status         | line | message                                           |
+----------------+------+---------------------------------------------------+
| Check
manually | 153  | Call to deprecated function openssl_pkey_free().
 |
+----------------+------+---------------------------------------------------+

Proposed resolution

Drop the condition and only unset the key:
Remove the following

    if (PHP_VERSION_ID < 80000) {
      // phpcs:disable
      openssl_pkey_free($pk);
      // phpcs:enable
    }
    else {
      unset($pk);
    }

And only use unset($pk);

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0 , varbase_api-10.0.6 , varbase-9.1.4 , varbase_api-9.1.5

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3456007 : Changed Call to deprecated function openssl_pkey_free() in PHP ~8
📌 Task
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024