feat(compat): emit stock PHP ini defaults to match v2 (#79)#90
Merged
Conversation
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.
Summary
Closes #79. Encodes the 12 ini keys that shivammathur/setup-php@v2 emits but our action currently doesn't, so the canonical-cell compat-diff gate from PR #77 clears without any allowlist suppression.
expose_php,log_errors,max_input_time,session.save_handler,session.gc_maxlifetime) via newcompat.StockIniDefaultsjit.ini+ 4 stock opcache.* compiled-defaults) via newcompat.OpcacheIniFragment, gated on PHP 8.x AND opcache being loaded; arch-aware onjit_buffer_size(256M x86_64 / 128M aarch64)xdebug.start_with_request=defaultadded to the existingXdebugIniFragmentThe compose pipeline grows from 3 layers to 5;
compose.MergeCompatLayersis refactored to variadic so future layers don't churn the signature.Spec
docs/superpowers/specs/2026-04-27-stock-php-ini-defaults-design.mdAudit chain
docs/compat-matrix.md§2.1, §2.2, §2.3 extended with the new keys, each citing pinned upstream sources (PHP-8.4 SHA171b722e…, v2 SHAaccd6127…). Notes recorded for two nuances surfaced during the audit:max_input_time=-1reflects the CLI-SAPI compiled-in default (overrides php.ini-production's literal60because the directive isPHP_INI_PERDIR/ FPM-CGI scoped); 4 of the 7 opcache keys originate from stock php.ini-production (commented in upstream) rather than v2's jit.ini, but ship together because the load-condition is identical.Test plan
make checkpasses (every commit, before push)internal/compatandinternal/composeat 100% / 90.4% coverage; new functions unit-tested with goldens (stock_ini_defaults.golden,opcache_ini_fragment_{x86_64,aarch64}.golden)make ci-cell OS=noble ARCH=x86_64 PHP=8.4green locally — all 10 fixtures includingbare,coverage-pcov,ini-and-coverage,multi-ext,multi-ext-top10-84,multi-ext-hard4-84kind: ignoreallowlist entries added todocs/compat-matrix.mdcompat-reportsticky comment shows "cleared" (or empty) on canonical cellPHPRC sanity probe (orthogonal, non-blocking — Task 7 of plan)
The local
make ci-cellharness doesn't surfacephp --iniper-fixture, so the probe was inconclusive on whetherPHPRC=<core>/usr/local/lib/php.iniactually loads the bundledphp.ini-productionat runtime. The encode-in-Go approach makes this orthogonal — the gate cleared regardless. Not filing a separate issue since there's no observable bug; if the bundled php.ini is later confirmed to be dead code at runtime it can be revisited.