Conversation
There was a problem hiding this comment.
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_opsinitialization andphp_stream_filter_alloc()call to match PHP 8.6 signatures/struct layout. - Replaced
INI_STR()usage withzend_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 commonlyINI_STR()) returns a pointer intended to be treated as read-only; storing intochar *can trigger const-discard warnings and may fail builds that use-Werror. Prefer usingconst char *algo_dir/const char *mode_dirin both branches to keep types consistent and avoid mutability assumptions.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
INI_STR()macro was removed in Audit zend_ini_string() and related functions php-src#21146. Replaced withzend_ini_string_literal()which has the samechar *return type.seekfunction pointer was added betweenfilteranddtorin thephp_stream_filter_opsstruct (Stream filter seeking php-src#19981). AddedNULLfor the seek callback since mcrypt filters don't support seeking.php_stream_filter_alloc()now takes 4 arguments instead of 3. AddedPSFS_SEEKABLE_NEVERas the fourth argument.create_filter'spersistentparameter type changed fromuint8_ttobool. Updated the function signature accordingly.