Known gap, deliberately deferred. Filed so it is a named, tracked deferral rather than a quiet non-conformance.
The problem
When the server answers questions about built-in PHP functions, classes, and extensions, it looks at the PHP process it is itself running in. That is not necessarily the PHP the project targets.
So:
- If the project targets a different PHP version than the one running the server, you see the server's built-ins.
- If the project uses an extension the server's PHP does not have loaded, none of it shows up.
- If a function was removed in the version the project targets, it is still offered.
Everything reflection can see is currently assumed to be available.
What the architecture asks for
RFC 1 §4.7 (docs/architecture/0001-foundational-architecture.md) says built-in knowledge must be parameterized by the project's target environment, and that no component may assume the server's own runtime is that target.
The seam is already in the right place — BuiltinBackend is the single component that answers this, and swapping what sits behind it does not touch anything else. The gap is the data source, not the structure.
Why it is not scheduled
Building a correct version- and extension-aware source of PHP's built-ins is a substantial project on its own. The obvious off-the-shelf option, JetBrains' phpstorm-stubs, was ruled out for known quality issues, and nothing has been picked to replace it. Holding up the rest of the foundation on that choice was judged the worse trade.
Open questions
Left open on purpose — the choice of data source decides most of them:
- where accurate per-version built-in data comes from
- how the target environment is worked out (
composer.json, explicit configuration, what to do about extensions a project never declares)
- when that needs re-reading
- whether the new source needs an index built up front, which would be the first thing in the project that is not resolved lazily on demand
Scope
Plan 0002 Step 5. Nothing currently scheduled depends on it. Because the seam is stable, the switch can ship behind a flag with the current behaviour as the fallback.
One thing to clean up alongside it: the S3.6 test that checks built-in function enumeration against get_defined_functions() only makes sense while this is reflection-backed.
Issue body written by AI (Claude Opus 5) and reviewed by a human before filing.
Known gap, deliberately deferred. Filed so it is a named, tracked deferral rather than a quiet non-conformance.
The problem
When the server answers questions about built-in PHP functions, classes, and extensions, it looks at the PHP process it is itself running in. That is not necessarily the PHP the project targets.
So:
Everything reflection can see is currently assumed to be available.
What the architecture asks for
RFC 1 §4.7 (
docs/architecture/0001-foundational-architecture.md) says built-in knowledge must be parameterized by the project's target environment, and that no component may assume the server's own runtime is that target.The seam is already in the right place —
BuiltinBackendis the single component that answers this, and swapping what sits behind it does not touch anything else. The gap is the data source, not the structure.Why it is not scheduled
Building a correct version- and extension-aware source of PHP's built-ins is a substantial project on its own. The obvious off-the-shelf option, JetBrains'
phpstorm-stubs, was ruled out for known quality issues, and nothing has been picked to replace it. Holding up the rest of the foundation on that choice was judged the worse trade.Open questions
Left open on purpose — the choice of data source decides most of them:
composer.json, explicit configuration, what to do about extensions a project never declares)Scope
Plan 0002 Step 5. Nothing currently scheduled depends on it. Because the seam is stable, the switch can ship behind a flag with the current behaviour as the fallback.
One thing to clean up alongside it: the S3.6 test that checks built-in function enumeration against
get_defined_functions()only makes sense while this is reflection-backed.Issue body written by AI (Claude Opus 5) and reviewed by a human before filing.