Repository navigation
PHP 8.6: restore mbstring in Apache and CLI images - #103
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The dependency lifecycle, extension compilation, and functional coverage are consistent and complete.
0 open findings
What changed in this PR
Restores mbstring support in PHP 8.6 Apache and CLI images.
Changes:
- Adds mbstring build/runtime dependencies.
- Compiles the bundled extension.
- Adds Unicode-focused functional tests.
| File | Description |
|---|---|
php/Dockerfile-8.6 |
Enables mbstring in the Apache image. |
php/Dockerfile-8.6-cli |
Enables mbstring in the CLI image. |
tools/tests/Extensions/MbstringTest.php |
Tests core mbstring operations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
PHP 8.6 images are missing
mbstring, so applications using functions such asmb_strlen()andmb_convert_encoding()fail. Upstream deliberately stopped compiling it into the base images when removing PEAR/PECL in docker-library/php#1654. Earlier versions inherited the extension from upstream; PHP 8.6 needs an explicit installation in our images.This change builds the bundled
mbstringextension in the PHP 8.6 Apache and CLI Dockerfiles, usinglibonig-devduring compilation and retaininglibonig5after development packages are purged. It adds functional coverage for Unicode length, substrings, searching, case conversion, UTF-8 validation and encoding conversion. The test follows existing extension-test conventions and skips only when the extension is absent.Dependency verification
Ran
tools/compute-minimal-ext-deps.phpon an existing PHP 8.6.0RC3 image, then installed and compiled only mbstring in a disposable container and ran the helper again. The sole additional runtime package waslibonig5(libonig.so.5.4.0); the extension also uses the existing libc6. After marking libonig5 manual and purging libonig-dev, the report was unchanged and the functional test still passed. No extra compiler flags were needed.Validation
git diff --checkpasses. Images were not published.This PR targets master and contains only the mbstring fix and its test. It has no dependency on #102 or the extension-inventory proposal.