Skip to content

PHP 8.6 support#26

Open
rlerdorf wants to merge 1 commit intomasterfrom
php86
Open

PHP 8.6 support#26
rlerdorf wants to merge 1 commit intomasterfrom
php86

Conversation

@rlerdorf
Copy link
Copy Markdown
Member

@rlerdorf rlerdorf commented Apr 6, 2026

  • The INI_STR() macro was removed in Audit zend_ini_string() and related functions php-src#21146. Replaced with zend_ini_string_literal() which has the same char * return type.
  • A new seek function pointer was added between filter and dtor in the php_stream_filter_ops struct (Stream filter seeking php-src#19981). Added NULL for the seek callback since mcrypt filters don't support seeking.
  • php_stream_filter_alloc() now takes 4 arguments instead of 3. Added PSFS_SEEKABLE_NEVER as the fourth argument.
  • create_filter's persistent parameter type changed from uint8_t to bool. Updated the function signature accordingly.

@rlerdorf rlerdorf requested a review from Copilot April 6, 2026 12:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the mcrypt stream filter extension and CI workflow to compile against PHP 8.6 API changes.

Changes:

  • Adjusted php_stream_filter_ops initialization and php_stream_filter_alloc() call to match PHP 8.6 signatures/struct layout.
  • Replaced INI_STR() usage with zend_ini_string_literal() for PHP 8.6+.
  • Extended GitHub Actions matrices to include PHP 8.6.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
mcrypt_filter.c Adds PHP 8.6 conditional compilation for new stream filter APIs and INI access changes.
.github/workflows/build.yml Expands CI matrices to build/test against PHP 8.6.
Comments suppressed due to low confidence (1)

mcrypt_filter.c:1

  • zend_ini_string_literal() (and commonly INI_STR()) returns a pointer intended to be treated as read-only; storing into char * can trigger const-discard warnings and may fail builds that use -Werror. Prefer using const char *algo_dir / const char *mode_dir in both branches to keep types consistent and avoid mutability assumptions.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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