Skip to content

Enhance APCu include detection for in-tree builds#93

Open
henderkes wants to merge 1 commit into
kjdev:masterfrom
henderkes:patch-1
Open

Enhance APCu include detection for in-tree builds#93
henderkes wants to merge 1 commit into
kjdev:masterfrom
henderkes:patch-1

Conversation

@henderkes

@henderkes henderkes commented Jun 26, 2026

Copy link
Copy Markdown

see kjdev/php-ext-zstd#100

in in-tree compilation it previously always silently falls back to "not found", now it works

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of APCu support during configuration, allowing builds to find the required header in more locations.
    • Configuration now continues without APCu support when it is optional, instead of failing outright.
    • When APCu is explicitly requested, setup now provides clearer failure behavior if the support files are unavailable.

see kjdev/php-ext-zstd#100

in in-tree compilation it previously always silently falls back to "not found", now it works
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The build configuration now searches for apc_serializer.h in the source tree when it is missing from the PHP include directory, enables APCu support when found, and only stops with an error when APCu was explicitly requested and still unavailable.

Changes

APCu detection fallback

Layer / File(s) Summary
Header discovery and enablement
config.m4
The APCu check adds a fallback lookup in $abs_srcdir, adjusts phpincludedir for include discovery, preserves HAVE_APCU_SUPPORT on success, and changes the missing-header path to error only when PHP_APCU is not auto.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • kjdev/php-ext-brotli#92: Updates the same config.m4 APCu detection path and HAVE_APCU_SUPPORT handling around brotli build configuration.

Poem

A rabbit hops through config glade, 🐇
Finds APCu where the source was laid.
If headers hide, I sniff and see,
Then softly set support to “yes” for thee.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: improved APCu include detection for in-tree builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config.m4`:
- Around line 141-143: The APCu header fallback currently mutates the shared
phpincludedir configure variable, which can affect later header checks in the
same configure run. Update the config.m4 logic around the APCu header test to
use an APCu-specific temporary variable for the fallback path instead of
rewriting phpincludedir, and keep the original phpincludedir value unchanged for
the rest of the configure process.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5cd7dd5a-77d6-4499-9b17-f8afc47083f9

📥 Commits

Reviewing files that changed from the base of the PR and between 3e35f34 and 7cdc012.

📒 Files selected for processing (1)
  • config.m4

Comment thread config.m4
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.

1 participant