Skip to content

fix: resolve deprecated nullable parameter typing for PHP 8.4 compatibility#51

Open
betooliveirawj wants to merge 2 commits into
intelipost:masterfrom
betooliveirawj:master
Open

fix: resolve deprecated nullable parameter typing for PHP 8.4 compatibility#51
betooliveirawj wants to merge 2 commits into
intelipost:masterfrom
betooliveirawj:master

Conversation

@betooliveirawj

Copy link
Copy Markdown

This pull request makes minor improvements to type hinting in the Helper/Data.php file by updating method signatures to use nullable array syntax. This change increases code clarity and aligns with modern PHP standards.

  • Type Hinting Improvements:
    • Updated the saveResultQuotes and getAdditionalInformation methods to use the nullable array type hint (?array) instead of accepting array|null. [1] [2]Title:

Description:

  • In PHP 8.4, parameters typed as non-nullable (e.g. array) can no longer implicitly use = null, requiring the type to be explicitly declared as nullable (?array or array|null).

Checklist:

  • Changes are consistent with the project's coding style.
  • Documentation (if applicable) has been updated.
  • Link to related issue (if applicable):

Testing Instructions:

  • The module should continue working as-is after the fix, with the only change being the explicit declaration of nullable parameter types to ensure compatibility with PHP 8.4 and remove deprecation warnings.

PHPDOC: https://www.php.net/manual/en/migration84.deprecated.php?utm_source=chatgpt.com

fix: #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when installing on PHP 8.4

1 participant