Skip to content

Fix build with PHP 8.6 - #23

Merged
derickr merged 1 commit into
php:mainfrom
secuserve:php86-compat
Nov 20, 2026
Merged

derickr merged 1 commit into
php:mainfrom
secuserve:php86-compat

Conversation

@secuserve

Copy link
Copy Markdown

PHP 8.6 removed two macros this extension relies on (see UPGRADING.INTERNALS):

  • XtOffsetOf() was an alias of offsetof(); use offsetof() directly.
  • INI_STR() is replaced by zend_ini_string_literal(), as php-src did in
    ext/standard/mail.c. A fallback to INI_STR() keeps PHP 8.3 to 8.5
    building. Both return NULL for a missing entry, so the sendmail_path
    check behaves as before.

#22 covered XtOffsetOf() only and was closed unmerged.

PHP 8.6 removed the XtOffsetOf() alias and the INI_STR() macro.
Use offsetof() directly, and zend_ini_string_literal() with a
fallback to INI_STR() for PHP < 8.6.

Co-Authored-By: Claude Opus 5.5
@derickr
derickr merged commit c441c79 into php:main Nov 20, 2026
tomas-kulhanek added a commit to tomas-kulhanek/docker-php that referenced this pull request Nov 20, 2026
IMAP 1.0.3 does not compile on PHP 8.6, so for 8.6 PIE installs IMAP
from the pinned upstream commit with the 8.6 build fix
(php/pecl-mail-imap#23). PHP 8.3-8.5 keep the released IMAP 1.0.3.

The released PIE extensions do not compile on 8.6 yet, so 8.6 runs only
as an experimental CI smoke job and is not published to GHCR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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