Skip to content

Remove dependency on hash extension on 8.6#79

Merged
kocsismate merged 1 commit into
DomBlack:masterfrom
remicollet:issue-php86a2
Jul 22, 2026
Merged

Remove dependency on hash extension on 8.6#79
kocsismate merged 1 commit into
DomBlack:masterfrom
remicollet:issue-php86a2

Conversation

@remicollet

@remicollet remicollet commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

From UPGRADING.INTERNALS

  . The zend_parse_parameters_none_throw(), zend_parse_parameters_throw(),
    and ZEND_PARSE_PARAMS_THROW have been removed due to being misleading,
    since ZPP always throws, unless ZEND_PARSE_PARAMS_QUIET is given. Use
    the non-throw versions.

  . Added zend_bin2hex() and zend_bin2hex_str() as helper functions to remove
    dependencies on /ext/hash in various extensions.

And remove dependency on hash extension

@kocsismate

kocsismate commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Uhh @remicollet I just completely didn't notice this PR, and I fixed the same issues just now (#80) 😢 I'm sorry very much, and thanks for the help!

Comment thread php_scrypt.c Outdated
/* Get the parameters for this call */
raw_output = 0;
if (zend_parse_parameters_throw(
if (zend_parse_parameters(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This would be a slight change in the behavior because it wouldn't throw on PHP 7.x. That's why I used new ZPP for PHP 8.x, and stayed with zend_parse_parameters_throw() for PHP 7.x. In a few years, we can get rid of the old ZPP, I guess it will be time to require PHP 8.0+ then.

The ZPP migration also uncovered a few type issues which I also fixed/suppressed.

Comment thread php_scrypt.c
@remicollet remicollet changed the title Fix build with PHP 8.6.0alpha2 Remove dependency on hash extension on 8.6 Jul 22, 2026
@remicollet

Copy link
Copy Markdown
Contributor Author

Rebased and amended

@remicollet

Copy link
Copy Markdown
Contributor Author

Notice, checked no ext/hash symbols are used by

$ objdump -T modules/scrypt.so  | grep UND | grep -v GLIBC
0000000000000000      D  *UND*	0000000000000000  Base        compiler_globals
0000000000000000      D  *UND*	0000000000000000  Base        zend_parse_parameters
0000000000000000  w   D  *UND*	0000000000000000  Base        _ITM_deregisterTMCloneTable
0000000000000000      D  *UND*	0000000000000000  Base        zend_known_strings
0000000000000000      D  *UND*	0000000000000000  Base        _safe_emalloc
0000000000000000      D  *UND*	0000000000000000  Base        zend_argument_error
0000000000000000      D  *UND*	0000000000000000  Base        php_error_docref
0000000000000000  w   D  *UND*	0000000000000000  Base        __gmon_start__
0000000000000000      D  *UND*	0000000000000000  Base        zend_hash_str_find
0000000000000000      D  *UND*	0000000000000000  Base        zend_add_attribute
0000000000000000      D  *UND*	0000000000000000  Base        _efree
0000000000000000      D  *UND*	0000000000000000  Base        _zend_new_array_0
0000000000000000      D  *UND*	0000000000000000  Base        _emalloc
0000000000000000      D  *UND*	0000000000000000  Base        zend_bin2hex
0000000000000000      D  *UND*	0000000000000000  Base        executor_globals
0000000000000000      D  *UND*	0000000000000000  Base        add_assoc_long_ex
0000000000000000  w   D  *UND*	0000000000000000  Base        _ITM_registerTMCloneTable

@kocsismate kocsismate left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you very much!

@kocsismate
kocsismate merged commit 5a14bc7 into DomBlack:master Jul 22, 2026
12 checks passed
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.

2 participants