Skip to content

Fix build with PHP 8.6.0RC3 - #34

Merged
adamdickmeiss merged 1 commit into
indexdata:masterfrom
remicollet:issue-php86
Oct 13, 2026
Merged

adamdickmeiss merged 1 commit into
indexdata:masterfrom
remicollet:issue-php86

Conversation

@remicollet

Copy link
Copy Markdown
Contributor
  . The WRONG_PARAM_COUNT and ZEND_WRONG_PARAM_COUNT() macros have been
    removed. Call zend_wrong_param_count(); followed by RETURN_THROWS();
    instead.

  . The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed.
    Call zval_ptr_dtor_nogc() directly instead.

  . The WRONG_PARAM_COUNT and ZEND_WRONG_PARAM_COUNT() macros have been
    removed. Call zend_wrong_param_count(); followed by RETURN_THROWS();
    instead.

  . The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed.
    Call zval_ptr_dtor_nogc() directly instead.

@adamdickmeiss adamdickmeiss left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using these feature unconditionally changes the required mininum version.

The description says: RETURN_THROWS() -- which is PHP 8 only. But that seems not be used.

zval_ptr_dtor_nogc() is PHP 7.

Argument free declaration of zend_wrong_param_count() is PHP 7.

So in a number of places the code can be simplied if PHP 7 is now the minimum requirement. This can be a separate commit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unconditional destructor replacements break the declared PHP 5 compatibility.

1 open finding
What changed in this PR

Updates Zend API usage for PHP 8.6 compatibility.

Changes:

  • Replaces removed parameter-count macros.
  • Replaces the removed zval_dtor() alias.
File Description
php_yaz.c Updates removed Zend API usages.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread php_yaz.c
}

zval_dtor(pval_res);
zval_ptr_dtor_nogc(pval_res);
@adamdickmeiss
adamdickmeiss merged commit 0fff0bc into indexdata:master Oct 13, 2026
1 check passed
@adamdickmeiss

Copy link
Copy Markdown
Contributor

thx @remicollet

@remicollet
remicollet deleted the issue-php86 branch October 14, 2026 04:20
@remicollet

Copy link
Copy Markdown
Contributor Author

Sorry to have miss the compatibility with PHP 5.x
I noticed 2845e54
And I agree it doesn't make sense to keep compatibility for a version EOL since 2018

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants