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

Comments

Rajab Natshah created an issue. See original summary.

  • Rajab Natshah committed d1ff67f4 on 10.0.x
    Issue #3456007: Change Call to deprecated function openssl_pkey_free()...

  • Rajab Natshah committed 6b2fddb5 on 9.1.x
    Issue #3456007: Change Call to deprecated function openssl_pkey_free()...
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.0.0, +varbase_api-10.0.6, +varbase-9.1.4, +varbase_api-9.1.5
rajab natshah’s picture

Title: Change Call to deprecated function openssl_pkey_free() in PHP 8 » Change Call to deprecated function openssl_pkey_free() in PHP ~8
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_api-9.1.5

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_api-10.0.6

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-10.0.0

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.1.4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.